mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
Merge pull request #430 from kokoko3k/master
Hotfix for unaligned reflections when using geometry overrides
This commit is contained in:
commit
ef5d64fc87
|
@ -1007,6 +1007,10 @@ void main() {
|
||||||
co_content = Warp_fast(co_content, vWarp_vexp, vWarp_arg2, GEOM_CUT_EARS);
|
co_content = Warp_fast(co_content, vWarp_vexp, vWarp_arg2, GEOM_CUT_EARS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Mirror coords needs to be calculated here, before geom override, but after curvature.
|
||||||
|
//It is still not perfect but a reasonable tradeoff by now.
|
||||||
|
vec2 co_mirror = zoom(co_content, 1/BEZEL_REFL_ZOOMOUT_ROOM);
|
||||||
|
|
||||||
//Apply other content coords modifiers
|
//Apply other content coords modifiers
|
||||||
if (DO_GAME_GEOM_OVERRIDE == 1.0)
|
if (DO_GAME_GEOM_OVERRIDE == 1.0)
|
||||||
co_content = content_geom_override(co_content, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
|
co_content = content_geom_override(co_content, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
|
||||||
|
@ -1032,7 +1036,6 @@ void main() {
|
||||||
vec4 pixel_bezel;
|
vec4 pixel_bezel;
|
||||||
//SKIP LOGIC is inside fn_pixel_bezel
|
//SKIP LOGIC is inside fn_pixel_bezel
|
||||||
if (DO_BEZEL == 1.0) {
|
if (DO_BEZEL == 1.0) {
|
||||||
vec2 co_mirror = zoom(co_content, 1/BEZEL_REFL_ZOOMOUT_ROOM);
|
|
||||||
pixel_bezel = fn_pixel_bezel(co_bezel, co_mirror, BG_IMAGE_NIGHTIFY);
|
pixel_bezel = fn_pixel_bezel(co_bezel, co_mirror, BG_IMAGE_NIGHTIFY);
|
||||||
//If we used a smooth_border, canvas_busy is it, but since the content is in the bezel,
|
//If we used a smooth_border, canvas_busy is it, but since the content is in the bezel,
|
||||||
//we can safely use it to smooth/darken the game border
|
//we can safely use it to smooth/darken the game border
|
||||||
|
|
Loading…
Reference in a new issue