Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Rendering/Lighting/LightGrid.cpp

Diff revisions: vs.
  @@ -25,7 +25,12 @@
25 25
26 26 namespace Divide {
27 27
28 - LightGrid::ScreenRect LightGrid::findScreenSpaceBounds(const mat4<F32>& projection, const vec3<F32>& pt, F32 rad, I32 width, I32 height, F32 nearPlane) {
28 + LightGrid::ScreenRect LightGrid::findScreenSpaceBounds(const mat4<F32>& projection,
29 + const vec3<F32>& pt,
30 + F32 rad,
31 + I32 width,
32 + I32 height,
33 + F32 nearPlane) {
29 34 vec4<F32> reg = computeClipRegion(pt, rad, nearPlane, projection);
30 35 reg = -reg;
31 36
  @@ -49,7 +54,8 @@
49 54 }
50 55
51 56 inline bool testDepthBounds(const vec2<F32>& zRange, const LightGrid::LightInternal& light) {
52 - // Note that since in view space greater depth means _smaller_ z value (i.e. larger _negative_ Z values), it all gets turned inside out.
57 + // Note that since in view space greater depth means _smaller_ z value (i.e. larger _negative_ Z values),
58 + // it all gets turned inside out.
53 59 // Fairly easy to get confused...
54 60 F32 lightMin = light.position.z + light.range;
55 61 F32 lightMax = light.position.z - light.range;
  @@ -58,7 +64,8 @@
58 64 }
59 65
60 66 void LightGrid::build(const vec2<U16>& tileSize, const vec2<U16>& resolution, const Lights& lights,
61 - const mat4<F32>& modelView, const mat4<F32>& projection, F32 nearPlane, const vectorImpl<vec2<F32> >& gridMinMaxZ) {
67 + const mat4<F32>& modelView, const mat4<F32>& projection, F32 nearPlane,
68 + const vectorImpl<vec2<F32> >& gridMinMaxZ) {
62 69
63 70 m_gridMinMaxZ = gridMinMaxZ;
64 71 m_minMaxGridValid = !gridMinMaxZ.empty();
  @@ -228,7 +235,11 @@
228 235 #undef GRID_OFFSETS
229 236 }
230 237
231 - void LightGrid::buildRects(const vec2<U16>& resolution, const Lights& lights, const mat4<F32>& modelView, const mat4<F32>& projection, F32 nearPlane) {
238 + void LightGrid::buildRects(const vec2<U16>& resolution,
239 + const Lights& lights,
240 + const mat4<F32>& modelView,
241 + const mat4<F32>& projection,
242 + F32 nearPlane) {
232 243
233 244 m_viewSpaceLights.clear();
234 245 m_viewSpaceLights.reserve(lights.size());
  @@ -245,7 +256,7 @@
245 256 {
246 257 m_screenRects.push_back(rect);
247 258 // save light in model space
248 - m_viewSpaceLights.push_back(make_light(vp, l));
259 + m_viewSpaceLights.push_back(makeLight(vp, l));
249 260 }
250 261 }
251 262 }