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:
@@ -117,7 +117,7 @@ struct PostFXUniforms {
|
||||
float vignette_strength;
|
||||
float chroma_strength;
|
||||
float scanline_strength;
|
||||
float time;
|
||||
float screen_height;
|
||||
};
|
||||
|
||||
fragment float4 postfx_fs(PostVOut in [[stage_in]],
|
||||
@@ -133,7 +133,7 @@ fragment float4 postfx_fs(PostVOut in [[stage_in]],
|
||||
color.a = scene.sample(samp, in.uv ).a;
|
||||
|
||||
// Scanlines: horizontal sine-wave at ~360 lines (one dark band per 2 px at 720p)
|
||||
float scan = 0.85 + 0.15 * sin(in.uv.y * 3.14159265 * 720.0);
|
||||
float scan = 0.85 + 0.15 * sin(in.uv.y * 3.14159265 * u.screen_height);
|
||||
color.rgb *= mix(1.0, scan, u.scanline_strength);
|
||||
|
||||
// Vignette: radial edge darkening
|
||||
|
||||
Reference in New Issue
Block a user