sky should not be using model_sampler

This commit is contained in:
2023-09-28 18:28:10 -07:00
parent c65354c23f
commit 099865c682
2 changed files with 19 additions and 11 deletions

View File

@@ -49,13 +49,13 @@ struct ModelInstance{
//the texture transform then maps the texture coordinates to the location of the specific texture
//group 1 is the model
const MAX_MODEL_INSTANCES=4096;
@group(1)
@group(2)
@binding(0)
var<uniform> model_instances: array<ModelInstance, MAX_MODEL_INSTANCES>;
@group(1)
@group(2)
@binding(1)
var model_texture: texture_2d<f32>;
@group(1)
@group(2)
@binding(2)
var model_sampler: sampler;
@@ -85,16 +85,16 @@ fn vs_entity_texture(
}
//group 2 is the skybox texture
@group(2)
@group(1)
@binding(0)
var cube_texture: texture_cube<f32>;
@group(2)
@group(1)
@binding(1)
var cube_sampler: sampler;
@fragment
fn fs_sky(vertex: SkyOutput) -> @location(0) vec4<f32> {
return textureSample(cube_texture, model_sampler, vertex.sampledir);
return textureSample(cube_texture, cube_sampler, vertex.sampledir);
}
@fragment