Removed some debug code

This commit is contained in:
Tleety
2016-01-19 16:48:59 +01:00
parent a124ab2400
commit 5d6d0f82b9
2 changed files with 11 additions and 9 deletions
+11 -7
View File
@@ -114,12 +114,13 @@ void main()
int start = int(LightGrids.Data[currentTile].Start);
int amount = int(LightGrids.Data[currentTile].Amount);
//for(int i = 0; i < 3; i++)
for(int i = start; i < start + amount; i++) {
int l = int(LightIndex[i]);
LightSource light = LightSources.List[l];
LightResult result;
LightResult result;
if(light.Type == 1) { // point
result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
} else if (light.Type == 2) { //Directional
@@ -136,12 +137,15 @@ void main()
//fragmentColor += Input.DiffuseColor + vec4(0.0, LightGrids.Data[currentTile].Amount/3, 0, 1);
//fragmentColor = texel * Input.DiffuseColor * Color;
//fragmentColor += vec4(currentTile/3600.f, 0, 0, 1);
if(int(gl_FragCoord.x)%16 == 0 || int(gl_FragCoord.y)%16 == 0 ) {
//fragmentColor += vec4(0.5, 0, 0, 0);
} else {
//fragmentColor += vec4(LightGrids.Data[int(tilePos.x + tilePos.y*80)].Amount/3.0, 0, 0, 1);
}
//Tiled Debug Code
/*
if(int(gl_FragCoord.x)%16 == 0 || int(gl_FragCoord.y)%16 == 0 ) {
fragmentColor += vec4(0.5, 0, 0, 0);
} else {
fragmentColor += vec4(LightGrids.Data[int(tilePos.x + tilePos.y*80)].Amount/LightSources.List.length(), 0, 0, 1);
}
*/
}
@@ -95,7 +95,6 @@ void LightCullingPass::FillLightList(RenderScene& scene)
//p.Padding = 123.f;
p.Type = LightSource::Point;
m_LightSources.push_back(p);
}
}
for(auto &job : scene.DirectionalLightJobs) {
@@ -107,7 +106,6 @@ void LightCullingPass::FillLightList(RenderScene& scene)
p.Intensity = directionalLightJob->Intensity;
p.Type = LightSource::Directional;
m_LightSources.push_back(p);
}
}
}