THERE IS SOMETHING ON SCREEN
This commit is contained in:
@@ -15,7 +15,7 @@ layout(set=5)
|
||||
ParameterBlock<LightCullingData> pLightCullingData;
|
||||
|
||||
[shader("pixel")]
|
||||
float4 pixelMain(in MaterialParameter params : PARAMETER) : SV_Target
|
||||
float4 fragmentMain(in MaterialParameter params : PARAMETER) : SV_Target
|
||||
{
|
||||
let brdf = pMaterial.prepare(params);
|
||||
float3 result = float3(0, 0, 0);
|
||||
@@ -27,5 +27,5 @@ float4 pixelMain(in MaterialParameter params : PARAMETER) : SV_Target
|
||||
{
|
||||
result += pLightEnv.pointLights[i].illuminate(params, brdf);
|
||||
}
|
||||
return float4(1, 1, 0, 1.0f);
|
||||
return float4(result, 1.0f);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "TerrainMaterial",
|
||||
"name": "Placeholder",
|
||||
"params": {
|
||||
},
|
||||
"code": [
|
||||
|
||||
@@ -7,6 +7,7 @@ struct MaterialParameter
|
||||
float3 tangent;
|
||||
float3 biTangent;
|
||||
float3 viewDir_TS;
|
||||
float3 vertexColor;
|
||||
}
|
||||
|
||||
struct VertexAttributes
|
||||
|
||||
@@ -17,6 +17,7 @@ struct StaticMeshVertexData : IVertexData
|
||||
params.normal = float3(normals[3 * index + 0], normals[3 * index + 1], normals[3 * index + 2]);
|
||||
params.tangent = float3(tangents[3 * index + 0], tangents[3 * index + 1], tangents[3 * index + 2]);
|
||||
params.biTangent = float3(biTangents[3 * index + 0], biTangents[3 * index + 1], biTangents[3 * index + 2]);
|
||||
params.vertexColor = float3(color[3 * index + 0], color[3 * index + 1], color[3 * index + 2]);
|
||||
attributes.parameter = params;
|
||||
attributes.clipPosition = clipPos;
|
||||
return attributes;
|
||||
@@ -26,4 +27,5 @@ struct StaticMeshVertexData : IVertexData
|
||||
StructuredBuffer<float> normals;
|
||||
StructuredBuffer<float> tangents;
|
||||
StructuredBuffer<float> biTangents;
|
||||
StructuredBuffer<float> color;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user