You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default fractal colorizer outputs raw sRGB values instead of the linear-sRGB values expected by shaders. This means that sometimes rendering to the wrong surface or texture format will cause fractals to look "washed-out".
The Workaround
The current work around is to just keep fractal textures in Rgba8Unorm format and to only render to Bgra8Unorm surfaces. Rendering fractal textures to a Rgb8UnormSrgb texture would cause generated PNGs to look washed-out and using a Bgra8UnormSrgb surface format will make the fractal look washed-out in the viewer.
The Solution
My eventual plan for a solution for this is to switch everything over to Rgba8UnormSrgb and Bgra8UnormSrgb formats and just have this specific colorizer convert its output back to linear-sRGB in the shader and not perform any conversion for the CPU variant.
When new colorizers are introduced, GPU colorizers will output linear-sRGB by default in the shader and let WGPU convert their output to sRGB for storage. CPU colorizers will also output linear-sRGB by default but will have to have their output manually converted to sRGB.
The text was updated successfully, but these errors were encountered:
I should note that not everything supports the Bgra8UnormSrgb surface format (e.g. WebGPU). So instead, I should probably have it be configurable whether any colorizer outputs sRGB or linear.
The Issue
Currently the default fractal colorizer outputs raw sRGB values instead of the linear-sRGB values expected by shaders. This means that sometimes rendering to the wrong surface or texture format will cause fractals to look "washed-out".
The Workaround
The current work around is to just keep fractal textures in
Rgba8Unorm
format and to only render toBgra8Unorm
surfaces. Rendering fractal textures to aRgb8UnormSrgb
texture would cause generated PNGs to look washed-out and using aBgra8UnormSrgb
surface format will make the fractal look washed-out in the viewer.The Solution
My eventual plan for a solution for this is to switch everything over to
Rgba8UnormSrgb
andBgra8UnormSrgb
formats and just have this specific colorizer convert its output back to linear-sRGB in the shader and not perform any conversion for the CPU variant.When new colorizers are introduced, GPU colorizers will output linear-sRGB by default in the shader and let WGPU convert their output to sRGB for storage. CPU colorizers will also output linear-sRGB by default but will have to have their output manually converted to sRGB.
The text was updated successfully, but these errors were encountered: