Support sharing Pipeline
state between TextAtlas
(#95)
* Support sharing `Pipeline` state between `TextAtlas` * Keep using `Vec` for pipeline cache * Use `OnceCell` to keep `Pipeline` private * Revert "Use `OnceCell` to keep `Pipeline` private" This reverts commit 4112732b1734a3bb6b915d2103e699ef549b77c1. * Rename `Pipeline` type to `Cache`
This commit is contained in:
parent
670140e2a1
commit
5aed9e1477
6 changed files with 295 additions and 237 deletions
|
@ -21,17 +21,17 @@ struct Params {
|
|||
};
|
||||
|
||||
@group(0) @binding(0)
|
||||
var<uniform> params: Params;
|
||||
|
||||
@group(1) @binding(0)
|
||||
var color_atlas_texture: texture_2d<f32>;
|
||||
|
||||
@group(1) @binding(1)
|
||||
@group(0) @binding(1)
|
||||
var mask_atlas_texture: texture_2d<f32>;
|
||||
|
||||
@group(1) @binding(2)
|
||||
@group(0) @binding(2)
|
||||
var atlas_sampler: sampler;
|
||||
|
||||
@group(1) @binding(0)
|
||||
var<uniform> params: Params;
|
||||
|
||||
fn srgb_to_linear(c: f32) -> f32 {
|
||||
if c <= 0.04045 {
|
||||
return c / 12.92;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue