Removed some debug code
This commit is contained in:
@@ -114,12 +114,13 @@ void main()
|
|||||||
|
|
||||||
int start = int(LightGrids.Data[currentTile].Start);
|
int start = int(LightGrids.Data[currentTile].Start);
|
||||||
int amount = int(LightGrids.Data[currentTile].Amount);
|
int amount = int(LightGrids.Data[currentTile].Amount);
|
||||||
//for(int i = 0; i < 3; i++)
|
|
||||||
for(int i = start; i < start + amount; i++) {
|
for(int i = start; i < start + amount; i++) {
|
||||||
|
|
||||||
int l = int(LightIndex[i]);
|
int l = int(LightIndex[i]);
|
||||||
LightSource light = LightSources.List[l];
|
LightSource light = LightSources.List[l];
|
||||||
LightResult result;
|
|
||||||
|
|
||||||
|
LightResult result;
|
||||||
if(light.Type == 1) { // point
|
if(light.Type == 1) { // point
|
||||||
result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
||||||
} else if (light.Type == 2) { //Directional
|
} 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 += Input.DiffuseColor + vec4(0.0, LightGrids.Data[currentTile].Amount/3, 0, 1);
|
||||||
//fragmentColor = texel * Input.DiffuseColor * Color;
|
//fragmentColor = texel * Input.DiffuseColor * Color;
|
||||||
//fragmentColor += vec4(currentTile/3600.f, 0, 0, 1);
|
//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.Padding = 123.f;
|
||||||
p.Type = LightSource::Point;
|
p.Type = LightSource::Point;
|
||||||
m_LightSources.push_back(p);
|
m_LightSources.push_back(p);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(auto &job : scene.DirectionalLightJobs) {
|
for(auto &job : scene.DirectionalLightJobs) {
|
||||||
@@ -107,7 +106,6 @@ void LightCullingPass::FillLightList(RenderScene& scene)
|
|||||||
p.Intensity = directionalLightJob->Intensity;
|
p.Intensity = directionalLightJob->Intensity;
|
||||||
p.Type = LightSource::Directional;
|
p.Type = LightSource::Directional;
|
||||||
m_LightSources.push_back(p);
|
m_LightSources.push_back(p);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user