needs some more work

This commit is contained in:
kossLAN 2025-06-10 13:52:54 -04:00
parent 8845996c8c
commit 41ad28610a
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
4 changed files with 146 additions and 81 deletions

View file

@ -63,7 +63,7 @@ void main() {
vec4 glassColor = vec4(r, g, b, 1.0);
// Simple edge reflection - back to what worked
// Simple edge reflection
float edgeWidth = ubuf.edgeReflectionWidth;
// Calculate distance from edges
@ -84,16 +84,16 @@ void main() {
// Simple reflection logic
if (minDistToEdge == distFromLeft) {
// Left edge - flip horizontally
reflectionUV.x = 1.0 - distortedUV.x;
reflectionUV.x = 0.5 - distortedUV.x;
} else if (minDistToEdge == distFromRight) {
// Right edge - keep as is but sample from further right
reflectionUV.x = distortedUV.x + 0.1;
} else if (minDistToEdge == distFromTop) {
// Top edge - flip vertically
reflectionUV.y = 1.0 - distortedUV.y;
reflectionUV.y = 0.5 - distortedUV.y;
} else {
// Bottom edge - flip vertically
reflectionUV.y = 1.0 - distortedUV.y + 0.1;
reflectionUV.y = 0.5 - distortedUV.y + 0.1;
}
// Clamp to valid range