Vertex Shader Depth Perception in Orthographic Game Rendering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional games using orthographic projection lack a sense of depth as characters on the near and far sides appear the same size, failing to effectively convey spatial relationships in the game space.
Innovation Solution
A computer-readable storage medium with a game program that uses a vertex shader to transform objects in the virtual space, enlarging or reducing them based on their position relative to the camera, allowing for a more immersive depth perception by adjusting sizes of objects on the near and far sides without altering physics calculations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If orthographic projection is used to draw the game space, then the game space can be displayed with consistent scaling, but the sense of depth is lost as characters on near and far sides appear the same size
Solution Approach 1:
The patent applies a 2.5D projection technique that combines 2D orthographic projection with 3D depth perception. By introducing a depth factor based on the character's position in the virtual space and modifying the projection matrix accordingly, characters on the near side are enlarged while characters on the far side are reduced, creating a sense of depth while maintaining the overall 2D game space structure.
Solution Approach 2:
The patent dynamically changes the projection parameters based on the character's position in the virtual space. By calculating the distance from the camera and adjusting the projection scale factor accordingly, the system transforms the fixed orthographic projection into a dynamic projection that adapts to the character's position, enabling depth perception without altering the fundamental orthographic nature of the game space.
2Loss of information
If objects are enlarged or reduced in the virtual space to create depth perception, then depth perception is improved, but collision detection and other game processing require correction
Solution Approach 1:
The patent extracts the depth perception effect from the actual object sizes in the virtual space and applies it only during the rendering phase. By separating the logical game space (where objects maintain their original sizes for collision detection) from the visual representation (where depth perception is applied through projection transformation), the system achieves depth perception without affecting game processing logic.
Solution Approach 2:
The patent introduces a projection transformation as an intermediary between the virtual space and the displayed image. This transformation layer applies the depth perception effect by modifying the projection matrix based on object positions, while the underlying virtual space and game logic remain unchanged, thus avoiding the need to correct collision detection or other processing.
3Loss of information
If perspective projection is used instead of orthographic projection, then depth perception is improved, but the game space distortion increases
Solution Approach 1:
The patent applies depth perception effects locally to individual characters based on their position in the virtual space, rather than applying a global perspective projection to the entire game space. By modifying the projection matrix locally for each character based on its distance from the camera, the system achieves depth perception for characters while maintaining the overall orthographic structure of the game space, thus avoiding global distortion.
Data Source
AI summary
On the basis of orthographic projection, objects in a virtual space are drawn in a frame buffer, and further, in a first scene in a game, drawing is performed while transformation is performed by a vertex shader such that, among the objects in the virtual space, at least a player character object and one or some of the terrain objects are moved to a near side and are enlarged, or are moved to a far side and are reduced.


