Add anaglyph 3D post-processing effect support#1
Open
yoavfrancis wants to merge 3 commits intomasterfrom
Open
Conversation
Adds a red-cyan anaglyph post-processing pass so the game can be viewed with standard 3D glasses. Each frame is first rendered to an off-screen surface (m_renderTarget), then SurfaceProxy::applyAnaglyph3D combines it into the visible screen by extracting the red channel from a right-shifted copy (left eye) and the green+blue channels from a left-shifted copy (right eye), producing a classic stereoscopic depth effect. Changes: - SurfaceProxy: add static applyAnaglyph3D(src, dst, shift=5) - Engine: add m_renderTarget off-screen surface; scene renders into it; anaglyph transform applied to m_screen each frame before SDL_Flip https://claude.ai/code/session_01JyqcqkChDKjYQeYzHYZcnH
- Fix case-sensitive includes: <Vector> -> <vector> (ResourceManager.h, TileViewDrawer.h) - Add out-of-class definition for BoardModel::EMPTY_TILE (required pre-C++17) - Replace Windows backslash resource paths with forward slashes https://claude.ai/code/session_01JyqcqkChDKjYQeYzHYZcnH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds anaglyph (red-cyan) 3D post-processing support to the game engine, enabling stereoscopic 3D viewing with compatible glasses.
Key Changes
New
SurfaceProxy::applyAnaglyph3D()method: Implements red-cyan anaglyph 3D effect by combining two horizontally-shifted versions of the rendered frame into separate color channelsEngine rendering pipeline refactored:
m_renderTargetoff-screen surface to Engine for intermediate renderingm_renderTargetinstead of directly to screenm_renderTargetintom_screenImplementation Details
https://claude.ai/code/session_01JyqcqkChDKjYQeYzHYZcnH