You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear. This is necessary for proper HDR screen support in the future.
This commit is contained in:
@@ -75,6 +75,8 @@ class RendererCanvasRenderRD : public RendererCanvasRender {
|
||||
FLAGS_CLIP_RECT_UV = (1 << 9),
|
||||
FLAGS_TRANSPOSE_RECT = (1 << 10),
|
||||
|
||||
FLAGS_CONVERT_ATTRIBUTES_TO_LINEAR = (1 << 11),
|
||||
|
||||
FLAGS_NINEPACH_DRAW_CENTER = (1 << 12),
|
||||
FLAGS_USING_PARTICLES = (1 << 13),
|
||||
|
||||
@@ -195,6 +197,7 @@ class RendererCanvasRenderRD : public RendererCanvasRender {
|
||||
struct CanvasMaterialData : public RendererRD::MaterialStorage::MaterialData {
|
||||
CanvasShaderData *shader_data = nullptr;
|
||||
RID uniform_set;
|
||||
RID uniform_set_srgb;
|
||||
|
||||
virtual void set_render_priority(int p_priority) {}
|
||||
virtual void set_next_pass(RID p_pass) {}
|
||||
|
||||
Reference in New Issue
Block a user