mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 14:24:56 +00:00
CModelShaders: Split Thermal into ThermalModel, ThermalStatic extended shaders
This semi-hacky approach will be replaced with future hsh work
This commit is contained in:
@@ -146,7 +146,7 @@ vec3 LightingFunc() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
vec3 LightingFunc() {
|
||||
return vec3(1.0);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ UBINDING2 uniform ThermalUniform {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_COLD)
|
||||
#if defined(URDE_THERMAL_COLD) || defined(URDE_THERMAL_STATIC)
|
||||
vec3 LightingFunc() {
|
||||
return vec3(1.0);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ vec4 PostFunc(vec4 colorIn) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
vec4 PostFunc(vec4 colorIn) {
|
||||
return texture(extTex0, vtf.extUvs[0]).rrrr * tmulColor + taddColor;
|
||||
}
|
||||
@@ -280,6 +280,12 @@ vec4 PostFunc(vec4 colorIn) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_STATIC)
|
||||
vec4 PostFunc(vec4 colorIn) {
|
||||
return colorIn;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_SOLID)
|
||||
vec4 PostFunc(vec4 colorIn) {
|
||||
return solidColor;
|
||||
|
||||
@@ -145,7 +145,7 @@ float3 LightingFunc(in VertToFrag vtf) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
float3 LightingFunc(in VertToFrag vtf) {
|
||||
return float3(1.0, 1.0, 1.0);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
|
||||
return extTex0.Sample(samp, vtf.extUvs[0]).rrrr * tmulColor + taddColor;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ float3 LightingFunc(thread VertToFrag& vtf, constant LightingUniform& lu, textur
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
struct LightingUniform {
|
||||
float4 tmulColor;
|
||||
float4 taddColor;
|
||||
@@ -251,7 +251,7 @@ float4 PostFunc(thread VertToFrag& vtf, constant LightingUniform& lu,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(URDE_THERMAL_HOT)
|
||||
#if defined(URDE_THERMAL_MODEL)
|
||||
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) {
|
||||
|
||||
@@ -265,7 +265,12 @@ fragment float4 fmain(VertToFrag vtf [[ stage_in ]],
|
||||
#srcfac one
|
||||
#dstfac zero
|
||||
#colorwrite false
|
||||
#depthtest gequal
|
||||
#alphawrite true
|
||||
#depthwrite false
|
||||
#culling none
|
||||
#depthtest none
|
||||
#primitive tristrips
|
||||
#overwritealpha true
|
||||
|
||||
#vertex glsl
|
||||
layout(location=0) in vec4 posIn;
|
||||
|
||||
Reference in New Issue
Block a user