particle alpha inflkuence on glow

This commit is contained in:
AzaezelX 2025-12-20 20:43:03 -06:00
parent dd72a627a9
commit e83849f6a0
2 changed files with 6 additions and 4 deletions

View file

@ -108,9 +108,10 @@ void main()
vec3 colorScale = ( alphaFactor < 0.0 ? IN_color.rgb * diffuse.rgb : vec3( alphaFactor > 0.0 ? IN_color.a * diffuse.a * alphaFactor * softBlend : softBlend ) );
if (glow)
{
vec3 glowCol = (IN_color * diffuse).rgb*10;//pow((IN_color * diffuse).rgb*10,3.54406804435);
float alphaLim = IN_color.a * diffuse.a;
vec3 glowCol = (IN_color * diffuse).rgb*10;
glowCol*=glowCol*glowCol*0.54406804435;
colorScale *= glowCol.rgb;
colorScale *= glowCol.rgb*alphaLim;
}
OUT_col = hdrEncode( vec4( IN_color.rgb * diffuse.rgb * colorScale,
IN_color.a * diffuse.a * softBlend * alphaScale ) );

View file

@ -105,8 +105,9 @@ float4 main( Conn IN ) : TORQUE_TARGET0
float3 colorScale = ( alphaFactor < 0.0 ? IN.color.rgb * diffuse.rgb : ( alphaFactor > 0.0 ? IN.color.a * diffuse.a * alphaFactor * softBlend : softBlend ) );
if (glow)
{
float4 glowCol = float4(pow(max((IN.color * diffuse).rgb*10,0.0),3.54406804435),(IN.color * diffuse).a);
colorScale *= glowCol.rgb;
float alphaLim = IN.color.a * diffuse.a;
float3 glowCol = pow(max((IN.color * diffuse).rgb*10,0.0),3.54406804435);
colorScale *= glowCol*alphaLim;
}
return hdrEncode( float4( IN.color.rgb * diffuse.rgb * colorScale,
IN.color.a * diffuse.a * softBlend * alphaScale ) );