MCPcopy Create free account
hub / github.com/assaultcube/AC / postlightarea

Function postlightarea

source/src/worldlight.cpp:147–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void postlightarea(const block &a) // median filter, smooths out random noise in light and makes it more mipable
148{
149 int ia = (a.xs + 1) >> 1, ib = a.xs - ia;;
150 for(int y = a.ys - 1; y >= 0; y -= 2)
151 {
152 sqr *s = S(a.x,y+a.y);
153 postlightarealine(s, ia);
154 postlightarealine(s + 1, ib);
155 }
156 for(int y = a.ys - 2; y >= 0; y -= 2)
157 {
158 sqr *s = S(a.x,y+a.y);
159 postlightarealine(s, ia);
160 postlightarealine(s + 1, ib);
161 }
162 remip(a);
163}
164
165int lastcalclight = 0;
166

Callers 3

calclightFunction · 0.85
loopvFunction · 0.85
dodynlightsFunction · 0.85

Calls 2

postlightarealineFunction · 0.85
remipFunction · 0.85

Tested by

no test coverage detected