Skip to content

Commit

Permalink
Ensure optional variants are loaded last.
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiaanOlij committed Nov 15, 2023
1 parent 89f2f7f commit b1c4d4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion servers/rendering/renderer_rd/effects/copy_effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ CopyEffects::CopyEffects(bool p_prefer_raster_effects) {
copy_modes.push_back("\n"); // COPY_TO_FB_COPY
copy_modes.push_back("\n#define MODE_PANORAMA_TO_DP\n"); // COPY_TO_FB_COPY_PANORAMA_TO_DP
copy_modes.push_back("\n#define MODE_TWO_SOURCES\n"); // COPY_TO_FB_COPY2
copy_modes.push_back("\n#define MODE_SET_COLOR\n"); // COPY_TO_FB_SET_COLOR
copy_modes.push_back("\n#define MULTIVIEW\n"); // COPY_TO_FB_MULTIVIEW
copy_modes.push_back("\n#define MULTIVIEW\n#define MODE_TWO_SOURCES\n"); // COPY_TO_FB_MULTIVIEW_WITH_DEPTH
copy_modes.push_back("\n#define MODE_SET_COLOR\n"); // COPY_TO_FB_SET_COLOR

copy_to_fb.shader.initialize(copy_modes);

Expand Down
4 changes: 3 additions & 1 deletion servers/rendering/renderer_rd/effects/copy_effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ class CopyEffects {
COPY_TO_FB_COPY,
COPY_TO_FB_COPY_PANORAMA_TO_DP,
COPY_TO_FB_COPY2,
COPY_TO_FB_SET_COLOR,

// These variants are disabled unless XR shaders are enabled.
// They should be listed last.
COPY_TO_FB_MULTIVIEW,
COPY_TO_FB_MULTIVIEW_WITH_DEPTH,

COPY_TO_FB_SET_COLOR,
COPY_TO_FB_MAX,
};

Expand Down

0 comments on commit b1c4d4e

Please sign in to comment.