Skip to content

Commit

Permalink
Fixes for CModelShaders hlsl/metal
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Jan 9, 2021
1 parent 4b9bdcc commit 5191534
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Shaders/CModelShaders.frag.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ cbuffer ThermalUniform : register(b2) {
};
#endif

#if defined(URDE_THERMAL_COLD)
#if defined(URDE_THERMAL_COLD) || defined(URDE_THERMAL_STATIC)
float3 LightingFunc(in VertToFrag vtf) {
return float3(1.0, 1.0, 1.0);
}
Expand Down Expand Up @@ -279,6 +279,12 @@ float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
}
#endif

#if defined(URDE_THERMAL_STATIC)
float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
return colorIn;
}
#endif

#if defined(URDE_SOLID)
float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
return solidColor;
Expand Down
10 changes: 9 additions & 1 deletion Shaders/CModelShaders.frag.metal
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ float3 LightingFunc(thread VertToFrag& vtf, constant LightingUniform& lu, textur
}
#endif

#if defined(URDE_THERMAL_COLD)
#if defined(URDE_THERMAL_COLD) || defined(URDE_THERMAL_STATIC)
struct LightingUniform {};
float3 LightingFunc(thread VertToFrag& vtf, constant LightingUniform& lu, texture2d<float> extTex0, sampler clampSamp) {
return float3(1.0, 1.0, 1.0);
Expand Down Expand Up @@ -267,6 +267,14 @@ float4 PostFunc(thread VertToFrag& vtf, constant LightingUniform& lu,
}
#endif

#if defined(URDE_THERMAL_STATIC)
float4 PostFunc(thread VertToFrag& vtf, constant LightingUniform& lu,
texture2d<float> extTex0, texture2d<float> extTex1, texture2d<float> extTex2,
sampler samp, sampler clampSamp, sampler clampEdgeSamp, float4 colorIn) {
return colorIn;
}
#endif

#if defined(URDE_SOLID)
float4 PostFunc(thread VertToFrag& vtf, constant LightingUniform& lu,
texture2d<float> extTex0, texture2d<float> extTex1, texture2d<float> extTex2,
Expand Down
2 changes: 1 addition & 1 deletion hecl
Submodule hecl updated 1 files
+1 −1 extern/athena

0 comments on commit 5191534

Please sign in to comment.