lots of updates
This commit is contained in:
54
funnyassets/shaders/mesh_raster.shader
Normal file
54
funnyassets/shaders/mesh_raster.shader
Normal file
@@ -0,0 +1,54 @@
|
||||
#include "macros.hlsl"
|
||||
|
||||
COMMON {
|
||||
cbuffer CameraInfo
|
||||
{
|
||||
float4x4 g_matViewProjection;
|
||||
};
|
||||
struct PerModelData
|
||||
{
|
||||
float4x4 m_matTranslation;
|
||||
}
|
||||
StructuredBuffer<PerModelData> g_modelData;
|
||||
struct PS_INPUT
|
||||
{
|
||||
float4 m_vScreenPosition: SV_POSITION;
|
||||
float4 m_vWorldPosition: POSITION;
|
||||
}
|
||||
}
|
||||
VS
|
||||
{
|
||||
|
||||
struct VS_INPUT
|
||||
{
|
||||
float3 m_vPosition: POSITION;
|
||||
}
|
||||
|
||||
PS_INPUT vsMain( VS_INPUT input )
|
||||
{
|
||||
PS_INPUT output = {};
|
||||
output.m_vScreenPosition = float4(input.m_vPosition, 1);
|
||||
output.m_vScreenPosition = mul(
|
||||
output.m_vScreenPosition,
|
||||
g_modelData[0].m_matTranslation
|
||||
);
|
||||
output.m_vScreenPosition = mul(
|
||||
output.m_vScreenPosition,
|
||||
g_matViewProjection
|
||||
);
|
||||
output.m_vWorldPosition = float4(input.m_vPosition, 1);
|
||||
return output;
|
||||
}
|
||||
}
|
||||
PS
|
||||
{
|
||||
#include "brdf.hlsl"
|
||||
|
||||
float4 psMain( PS_INPUT input )
|
||||
{
|
||||
|
||||
float4 vWorldSpacePosition = input.m_vWorldPosition;
|
||||
return float4(vWorldSpacePosition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user