needs some more work
This commit is contained in:
parent
8845996c8c
commit
41ad28610a
4 changed files with 146 additions and 81 deletions
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue