Disabling lighting for now
This commit is contained in:
@@ -25,10 +25,10 @@ float4 fragmentMain(in FragmentParameter params) : SV_Target
|
||||
{
|
||||
result += pLightEnv.directionalLights[i].illuminate(lightingParams, brdf);
|
||||
}
|
||||
for(uint i = 0; i < lightCount; ++i)
|
||||
for(uint i = 0; i < pLightEnv.numPointLights; ++i)
|
||||
{
|
||||
uint lightIndex = pLightCullingData.lightIndexList[startOffset + i];
|
||||
result += pLightEnv.pointLights[lightIndex].illuminate(lightingParams, brdf);
|
||||
//uint lightIndex = pLightCullingData.lightIndexList[startOffset + i];
|
||||
result += pLightEnv.pointLights[i].illuminate(lightingParams, brdf);
|
||||
}
|
||||
result += brdf.evaluateAmbient(lightingParams.viewDir_WS);
|
||||
return float4(result, brdf.getAlpha());
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
const static float3 vertices[] = {
|
||||
// Right
|
||||
float3( 1, 1, 1),
|
||||
float3( 1, -1, 1),
|
||||
float3( 1, 1, 1),
|
||||
float3( 1, -1, -1),
|
||||
|
||||
float3( 1, -1, -1),
|
||||
float3( 1, 1, 1),
|
||||
float3( 1, 1, -1),
|
||||
|
||||
float3( 1, 1, -1),
|
||||
float3( 1, -1, 1),
|
||||
float3( 1, -1, -1),
|
||||
|
||||
// Left
|
||||
float3(-1, 1, -1),
|
||||
float3(-1, -1, -1),
|
||||
float3(-1, 1, -1),
|
||||
float3(-1, -1, 1),
|
||||
|
||||
float3(-1, -1, 1),
|
||||
float3(-1, 1, -1),
|
||||
float3(-1, 1, 1),
|
||||
|
||||
float3(-1, 1, 1),
|
||||
float3(-1, -1, -1),
|
||||
float3(-1, -1, 1),
|
||||
|
||||
// Bottom
|
||||
float3(-1, 1, 1),
|
||||
float3(-1, 1, -1),
|
||||
float3( 1, 1, 1),
|
||||
float3(-1, -1, 1),
|
||||
float3(-1, -1, -1),
|
||||
float3( 1, -1, 1),
|
||||
|
||||
float3( 1, 1, 1),
|
||||
float3(-1, 1, -1),
|
||||
float3( 1, 1, -1),
|
||||
float3( 1, -1, 1),
|
||||
float3(-1, -1, -1),
|
||||
float3( 1, -1, -1),
|
||||
|
||||
// Top
|
||||
float3(-1, -1, -1),
|
||||
float3(-1, -1, 1),
|
||||
float3( 1, -1, -1),
|
||||
|
||||
float3( 1, -1, -1),
|
||||
float3(-1, -1, 1),
|
||||
float3( 1, -1, 1),
|
||||
|
||||
// Back
|
||||
float3(-1, -1, 1),
|
||||
float3(-1, 1, -1),
|
||||
float3(-1, 1, 1),
|
||||
float3( 1, -1, 1),
|
||||
float3( 1, 1, -1),
|
||||
|
||||
float3( 1, -1, 1),
|
||||
float3( 1, 1, -1),
|
||||
float3(-1, 1, 1),
|
||||
float3( 1, 1, 1),
|
||||
|
||||
// Front
|
||||
float3( 1, -1, -1),
|
||||
float3( 1, 1, -1),
|
||||
float3(-1, -1, -1),
|
||||
// Back
|
||||
float3(-1, 1, 1),
|
||||
float3(-1, -1, 1),
|
||||
float3( 1, 1, 1),
|
||||
|
||||
float3(-1, -1, -1),
|
||||
float3( 1, 1, 1),
|
||||
float3(-1, -1, 1),
|
||||
float3( 1, -1, 1),
|
||||
|
||||
// Front
|
||||
float3( 1, 1, -1),
|
||||
float3( 1, -1, -1),
|
||||
float3(-1, 1, -1),
|
||||
|
||||
float3(-1, 1, -1),
|
||||
float3( 1, -1, -1),
|
||||
float3(-1, -1, -1),
|
||||
};
|
||||
|
||||
struct ViewParams
|
||||
|
||||
@@ -7,9 +7,8 @@ struct QuadOutput
|
||||
[shader("vertex")]
|
||||
QuadOutput quadMain(uint vertexIndex : SV_VertexID)
|
||||
{
|
||||
QuadOutput result;
|
||||
result.uv = float2((vertexIndex << 1) & 2, vertexIndex & 2);
|
||||
QuadOutput result;
|
||||
result.uv = float2(vertexIndex & 2, (vertexIndex << 1) & 2);
|
||||
result.position = float4(result.uv * 2.0f + -1.0f, 0.0f, 1.0f);
|
||||
result.uv.y = 1 - result.uv.y;
|
||||
return result;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ float4 screenToView(float4 screen)
|
||||
float2 texCoord = screen.xy / pViewParams.screenDimensions;
|
||||
|
||||
// Convert to clip space
|
||||
float4 clip = float4( float2( texCoord.x, 1.0f-texCoord.y ) * 2.0f - 1.0f, screen.z, screen.w);
|
||||
float4 clip = float4( texCoord * 2.0f - 1.0f, screen.z, screen.w);
|
||||
|
||||
return clipToView(clip);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ float4 clipToScreen(float4 clip)
|
||||
float oz = 1;
|
||||
float pz = 0 - 1;
|
||||
float zf = pz * ndc.z + oz;
|
||||
return float4(float2(texCoords.x, 1 - texCoords.y) * pViewParams.screenDimensions, zf, 1.0f);
|
||||
return float4(texCoords * pViewParams.screenDimensions, zf, 1.0f);
|
||||
}
|
||||
|
||||
struct Plane
|
||||
|
||||
@@ -337,7 +337,7 @@ struct CookTorrance : IBRDF
|
||||
float nDotL = max(dot(n, lightDir_WS), 0.0);
|
||||
|
||||
float3 result = (k_d * baseColor / PI + specular) * nDotL * lightColor;
|
||||
return result;
|
||||
return baseColor;
|
||||
}
|
||||
[mutating]
|
||||
void transformNormal(float3x3 tangentToWorld)
|
||||
|
||||
Reference in New Issue
Block a user