mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Apply luminance multiplier in copy_cubemap_to_panorama
This commit is contained in:
parent
cb7cd815ee
commit
8173f43770
3 changed files with 5 additions and 3 deletions
|
@ -401,6 +401,8 @@ void CopyEffects::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panoram
|
||||||
copy.push_constant.target[1] = 0;
|
copy.push_constant.target[1] = 0;
|
||||||
copy.push_constant.camera_z_far = p_lod;
|
copy.push_constant.camera_z_far = p_lod;
|
||||||
|
|
||||||
|
copy.push_constant.luminance_multiplier = prefer_raster_effects ? 2.0 : 1.0;
|
||||||
|
|
||||||
// setup our uniforms
|
// setup our uniforms
|
||||||
RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
|
RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ private:
|
||||||
int32_t section[4];
|
int32_t section[4];
|
||||||
int32_t target[2];
|
int32_t target[2];
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
uint32_t pad;
|
float luminance_multiplier;
|
||||||
// Glow.
|
// Glow.
|
||||||
float glow_strength;
|
float glow_strength;
|
||||||
float glow_bloom;
|
float glow_bloom;
|
||||||
|
|
|
@ -20,7 +20,7 @@ layout(push_constant, std430) uniform Params {
|
||||||
ivec4 section;
|
ivec4 section;
|
||||||
ivec2 target;
|
ivec2 target;
|
||||||
uint flags;
|
uint flags;
|
||||||
uint pad;
|
float luminance_multiplier;
|
||||||
// Glow.
|
// Glow.
|
||||||
float glow_strength;
|
float glow_strength;
|
||||||
float glow_bloom;
|
float glow_bloom;
|
||||||
|
@ -276,7 +276,7 @@ void main() {
|
||||||
#else
|
#else
|
||||||
vec4 color = textureLod(source_color, vec4(normal, params.camera_z_far), 0.0); //the biggest the lod the least the acne
|
vec4 color = textureLod(source_color, vec4(normal, params.camera_z_far), 0.0); //the biggest the lod the least the acne
|
||||||
#endif
|
#endif
|
||||||
imageStore(dest_buffer, pos + params.target, color);
|
imageStore(dest_buffer, pos + params.target, color * params.luminance_multiplier);
|
||||||
#endif // defined(MODE_CUBEMAP_TO_PANORAMA) || defined(MODE_CUBEMAP_ARRAY_TO_PANORAMA)
|
#endif // defined(MODE_CUBEMAP_TO_PANORAMA) || defined(MODE_CUBEMAP_ARRAY_TO_PANORAMA)
|
||||||
|
|
||||||
#ifdef MODE_SET_COLOR
|
#ifdef MODE_SET_COLOR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue