opengl - Simulating constant Pixels-Per-Unit in game graphics at different "Zoom Levels" -
i'm trying lay down graphical style game environment working on. meshes rendered @ low resolution in isometric give "sprite-like" appearance.
the issue keeping resolution have picked maintain correct pixels-per-unit in game. example, here cube rendered top face equal of 64 32px isometric tile: lets zoom level x1
now in engine unity, can play around screen size , cameras zoom in or out easily. keep original rendering resolution, can think of forcing player fullscreen, changing screen-resolution, , allowing scene scale accordingly.
so zoom in, cut resolution in half bring cube twice close screen. intended outcome: zoom level x2 (scaled in image editor).
the top face of cube appears still 64 32px though takes 128 64px on screen.
i want know if effect can simulated writing own shader , having parameter 'zoom level' (x1, x2, x4, x8). way don't have play magic tricks fullscreen resolution, , can let screen size independent of "render resolution."
zooming in off shelf shaders won't keep fixed pixels-per-unit, since cube closer , can take more pixels on screen, quality increases. (i can post 2 pictures @ time).
the higher quality of rendered cube nice , standard behavior, not intended effect. think "nearest neighbor" scaling in image editing software. kind of rendering i'm going after @ zoom levels x2, x4, x8. in real-time.
i know seems weird want meshes render sprites, concept interests me 'look' game.
so can done @ shader level? have looked writing own glsl shaders opengl , learning general flow of things.
can change how shader rasterizes fragments "nearest neighbor" sampling i'm going after?
can shader interact parameter "zoom level = 2" change behavior while rendering?
or perhaps there other ways achieve style of real-time rendering haven't come across?
and of course, shader does? might incorrect on stage of graphics pipeline handled at.
Comments
Post a Comment