Comments (2)
What formula would you recommend?
from learn-wgpu.
It's not about the formula (though, it's missing the conditional for small values https://en.wikipedia.org/wiki/SRGB#Transformation, but whatever).
The issue is that the color values in the shader are already in linear colorspace. The gpu does the conversion automatically because we specified that it's an srgb texture.
https://gpuweb.github.io/gpuweb/#texture-formats
If the format has the -srgb suffix, then sRGB conversions from gamma to linear and vice versa are applied during the reading and writing of color values in the shader.
from learn-wgpu.
Related Issues (20)
- Panic on texture example on Linux HOT 1
- Can't run tutorial examples from chapter 2 HOT 7
- Rebuild Pong HOT 1
- MouseMotion delta is not precise HOT 3
- In `tutorial1_window` I get a compiler error that something is not a future. HOT 1
- surface_format in "The Surface" breaking change for wpgu version 0.16.0 HOT 3
- Compiler errors after finishing the new() method for State HOT 1
- Safety note for create_surface appears off HOT 2
- Viewing Old Versions HOT 2
- OPENGL_TO_WGPU_MATRIX constant for NDC conversion is incorrect HOT 2
- dark theme / use mdBook HOT 1
- a correction is needed
- What is the purpose of "window_id == state.window().id()"?
- Code for `learn-wgpu/code/beginner/tutorial3-pipeline/src/challenge.wgsl` doesn't work HOT 3
- `bytemuck` isn't listed in dependencies for "Learn Wgpu" but is used HOT 1
- compiler error HOT 4
- More about compute shader HOT 2
- Update to 0.17 HOT 1
- Why is the triangle color a rainbow ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-wgpu.