mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #112801 from clayjohn/premul-alpha-sss
Apply `PREMUL_ALPHA_FACTOR` only in non-split-specular shader variants.
This commit is contained in:
commit
46adcc6268
1 changed files with 4 additions and 4 deletions
|
|
@ -2909,6 +2909,10 @@ void fragment_shader(in SceneData scene_data) {
|
||||||
frag_color.rgb = frag_color.rgb * fog.a + fog.rgb;
|
frag_color.rgb = frag_color.rgb * fog.a + fog.rgb;
|
||||||
#endif //!FOG_DISABLED
|
#endif //!FOG_DISABLED
|
||||||
|
|
||||||
|
#if defined(PREMUL_ALPHA_USED) && !defined(MODE_RENDER_DEPTH)
|
||||||
|
frag_color.rgb *= premul_alpha;
|
||||||
|
#endif //PREMUL_ALPHA_USED
|
||||||
|
|
||||||
#endif //MODE_SEPARATE_SPECULAR
|
#endif //MODE_SEPARATE_SPECULAR
|
||||||
|
|
||||||
#endif //MODE_RENDER_DEPTH
|
#endif //MODE_RENDER_DEPTH
|
||||||
|
|
@ -2921,10 +2925,6 @@ void fragment_shader(in SceneData scene_data) {
|
||||||
|
|
||||||
motion_vector = prev_position_uv - position_uv;
|
motion_vector = prev_position_uv - position_uv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PREMUL_ALPHA_USED) && !defined(MODE_RENDER_DEPTH)
|
|
||||||
frag_color.rgb *= premul_alpha;
|
|
||||||
#endif //PREMUL_ALPHA_USED
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue