Fix VDP2 background rendering pipeline#6
Open
spacestate1 wants to merge 1 commit intoyaz0r:masterfrom
Open
Conversation
- Shader: fix planeConfig sampler type (R32U -> RGBA8 with manual unpack), fix palette number extraction for 16-color and 256-color modes, wrap scroll coordinates properly (fixes negative scroll artifacts), fix dotInPlaneY using planeDotHeight instead of planeDotWidth, add zoom/coordinate increment support - Software renderer: implement renderLayerSoftware() so CPU render path works for all layers (was assert(0)), add zoom support - Resolution: handle all HRESO modes (0-7), separate VDP1 output resolution from VDP2 native resolution (e.g. title screen: VDP1=352, VDP2=704) - Compositing: set back screen clear color, render SPRITE_POLY at its priority before background layers, add alpha blending, clear composite view once instead of per-layer - View ordering: VDP1 renders before composite view - VDP2 registers: initialize zoom Y registers, fix computeStringLength missing return value
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.
Fixes VDP2 background layer rendering so layers display correctly at all resolutions.
Files changed
VDP2 shader
Layer data and GPU rendering
Software rendering path
renderLayerSoftware()function - renders on CPU and uploads to GPU texture. Replacesassert(0)that crashed when software mode was selected.Per-layer fixes (BG0, BG1, BG3, RBG0)
renderBG0(L988-1004): Remove duplicate resolution doubling, add zoom registers, use new software pathrenderBG1(L1104-1163): Add zoom registers, use new software pathrenderBG3(L1226-1240): Add output height, use new software pathrenderRBG0(L1307-1323): Add output height, use new software pathCompositing (final image assembly)
Supporting fixes
computeStringLength()Merge note
Safe to merge on its own. This is the biggest PR but all changes are self-consistent - the shader, texture format, and renderer code all match each other. Recommend merging this before PR 4 (title screen text), since the text layer needs these rendering fixes to actually show up.