Commit Graph

35 Commits (ef6ec265d84dc55d7794df4a984216f6eed32a4d)

Author SHA1 Message Date
Ben Hansen ef6ec265d8 Merge branch 'master' into web2 2 years ago
Ben Hansen 1135fead3a updated intermediate tutorial docs and removing tutorial13 for maintenance 2 years ago
roudy16 2c4b3668cd address review comment 2 years ago
roudy16 212da09b15 enable right-handed normal maps 2 years ago
sotrh f9b6704cc4
Merge pull request #322 from rokonio/patch-4
Add missing half_dir
2 years ago
Rokonio a9985c2f94
Add missing half_dir
The shader panics (see below) because `half_dir` is missing so I added it.
```
❯ cargo run
   Compiling graphic_rust v0.1.0 (/home/rokonio/dev/rust/graphic_rust)
    Finished dev [unoptimized + debuginfo] target(s) in 5.39s
     Running `target/debug/graphic_rust`
[2022-02-20T10:27:50Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_shader_module
      note: label = `Shader`
    
Shader 'Shader' parsing error: no definition in scope for identifier: 'half_dir'
   ┌─ wgsl:93:57
   │
93 │     let specular_strength = pow(max(dot(tangent_normal, half_dir), 0.0), 32.0);
   │                                                         ^^^^^^^^ unknown identifier


    no definition in scope for identifier: 'half_dir'

', /home/rokonio/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:2273:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
2 years ago
Rokonio 411702cf17
Correct an error in the normal map tutorial
`wgpu::BindingType::Sampler` is a tuple like variant
2 years ago
Ben Hansen c269f46a0e testing some things 2 years ago
Neil Blakey-Milner 6f388ff8eb Improve clarity of tutorial11 in terms of updates, files 3 years ago
Neil Blakey-Milner 41d8286645 Add missing or rename shader vars 3 years ago
Ferdinand Schäffler bd46bdb243 Converted docs. 3 years ago
Martino Fontana 11b24cebc5 model.rs: added "_bind_group" where appropriate 3 years ago
Ben Hansen c0754f9dd3 migrated tutorial5 3 years ago
Ben Hansen 57d7eb763f migrated tutorial4 3 years ago
Ben Hansen 822f2d6191 started 0.10 3 years ago
Martino Fontana b2b77294f6 Change "uniform" naming to "camera" 3 years ago
Ben Hansen 70bf012641 fixed tangent/bitangent comp and cargo fmt 3 years ago
Martino Fontana b5af53b272 Simplify DrawModel and DrawLight lifetimes 3 years ago
Ben Hansen 63e0d9c6b8 intermediate tutorials migrated 3 years ago
Ben Hansen 46eb5eb139 code now builds on 0.8 3 years ago
Elijah C. Voigt bcc79b5e41 Misc typo and code fixes.
009: impl Vertex for ModelVertex was using the vertex_attr_array! macro.
009: RenderPipelineDescriptor has a `vertex` member not  `vertex_state`.
009: to_rgba() should be to_rgba8(), to_rgba is set to be deprecated.

010: BindGroupDescriptor has a `entries` member not `bindings`.
010: Remove re-declaration of mat4 model_matrix;
010: Prefer hard-coded [#.#; #] instead of `Foo::fn().into()`.
010: Clarify which shader frag/vert file changes are in.

011: Change Model::load return type to Result<Self>.
011: TextureDescriptor does not have a array_layer_count member.

012: Add .into() to calls in Uniforms::update_view_proj().
012: Dereference delta variable in State::input().

013: Add more changed lines to Model::load to avoid compiler yelling.
3 years ago
Linden Krouse f6f6fa29c4
Fixed some spelling and grammar errors 3 years ago
Ben Hansen 87d0a97404 migrated intermediate tutorial docs 3 years ago
Ben Hansen b4dd4654e4 intermediate tutorial code migrated 3 years ago
Ben Hansen 91879d405b code up to 7 migrated 3 years ago
Ben Hansen 0620f0b05d migrated ModelVertex to use bytemuck derive 4 years ago
Ben Hansen 786ce2410c fixed config and readded missing tutorial11 4 years ago
Ben Hansen 9b02850917 started threading 4 years ago
Ben Hansen 8d5de2d87c migrated tutorial11 4 years ago
Hiroaki Yutani c80c674dd5 Move the comment 4 years ago
Hiroaki Yutani 3d9edd9b3a
Add some explanations on tutorial11 4 years ago
Ben Hansen 4063cc49de fixed #46 4 years ago
Ben Hansen 752533a706 finish normal mapping 4 years ago
Ben Hansen 387e17ba5f finished normal mapping tutorial 4 years ago
Ben Hansen ec5339bd3b started normals tutorial 4 years ago