Skip to content

Commit

Permalink
Samples: use RTSS to show normals
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Aug 10, 2024
1 parent 5373d12 commit d0d1c40
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 53 deletions.
12 changes: 0 additions & 12 deletions Samples/Media/materials/programs/GLSL/ShowNormals.glsl

This file was deleted.

11 changes: 0 additions & 11 deletions Samples/Media/materials/programs/HLSL_Cg/Example_Basic.cg
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,6 @@ void basicPassthroughTangent_v(float4 position : POSITION,
oPosition = mul(worldViewProj, position);
oTangent = tangent;
}
void basicPassthroughNormal_v(float4 position : POSITION,
float3 normal : NORMAL,

out float4 oPosition : POSITION,
out float3 oNormal : TEXCOORD0,

uniform float4x4 worldViewProj)
{
oPosition = mul(worldViewProj, position);
oNormal = normal;
}
// Basic fragment program to display UV
float4 showuv_p (float4 position : POSITION, float2 uv : TEXCOORD0) : COLOR
{
Expand Down
32 changes: 2 additions & 30 deletions Samples/Media/materials/scripts/ShowVertexAttributes.material
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,6 @@ vertex_program Examples/ShowTangents_v unified
delegate Examples/ShowTangents_vHLSL
}

vertex_program Examples/ShowNormals_vHLSL hlsl
{
source Example_Basic.cg
entry_point basicPassthroughNormal_v
target vs_2_0
default_params
{
param_named_auto worldViewProj worldviewproj_matrix
}
}

vertex_program Examples/ShowNormals_vGLSL glsl glsles
{
source ShowNormals.glsl
default_params
{
param_named_auto worldViewProj worldviewproj_matrix
}
}

vertex_program Examples/ShowNormals_v unified
{
delegate Examples/ShowNormals_vGLSL
delegate Examples/ShowNormals_vHLSL
}

material Examples/ShowUV
{
technique
Expand Down Expand Up @@ -137,11 +111,9 @@ material Examples/ShowNormals
{
pass
{
vertex_program_ref Examples/ShowNormals_v
{
}
fragment_program_ref Examples/ShowUVdir3D_p
rtshader_system
{
lighting_stage gbuffer normal
}
}
}
Expand Down

0 comments on commit d0d1c40

Please sign in to comment.