feat: F7/F8 redimensionan campo lógico, F1/F2 muestran notificación de zoom
- F7/F8: nuevo setFieldScale() cambia resolución lógica en pasos del 10% (mín 50%, máx limitado por pantalla), reinicia escena como F4 - F1/F2: muestran notificación "Zoom X%" al cambiar escala de ventana - Ventana física = lógico × zoom en todo momento; resizeWindowCentered() unifica el cálculo de posición leyendo el tamaño real con SDL_GetWindowSize - PostFXUniforms::time renombrado a screen_height; scanlines usan la altura lógica actual en lugar del 720 hardcodeado — F1/F2 escalan las scanlines visualmente, F7/F8 las mantienen a 1 franja por píxel lógico - Eliminados logs de debug de calculateMaxWindowScale y setWindowScale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ layout(set=3, binding=0) uniform PostFXUniforms {
|
||||
float vignette_strength;
|
||||
float chroma_strength;
|
||||
float scanline_strength;
|
||||
float time;
|
||||
float screen_height;
|
||||
} u;
|
||||
void main() {
|
||||
float ca = u.chroma_strength * 0.005;
|
||||
@@ -15,7 +15,7 @@ void main() {
|
||||
color.g = texture(scene, v_uv).g;
|
||||
color.b = texture(scene, v_uv - vec2( ca, 0.0)).b;
|
||||
color.a = texture(scene, v_uv).a;
|
||||
float scan = 0.85 + 0.15 * sin(v_uv.y * 3.14159265 * 720.0);
|
||||
float scan = 0.85 + 0.15 * sin(v_uv.y * 3.14159265 * u.screen_height);
|
||||
color.rgb *= mix(1.0, scan, u.scanline_strength);
|
||||
vec2 d = v_uv - vec2(0.5, 0.5);
|
||||
float vignette = 1.0 - dot(d, d) * u.vignette_strength;
|
||||
|
||||
Reference in New Issue
Block a user