Commit Graph

910 Commits

Author SHA1 Message Date
Ben Hansen
bd8172d0a2 removed shaderc from gifs 2022-02-25 15:44:23 -07:00
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
```
2022-02-20 11:43:04 +01:00
Rokonio
411702cf17
Correct an error in the normal map tutorial
`wgpu::BindingType::Sampler` is a tuple like variant
2022-02-20 10:57:40 +01:00
Ben Hansen
a9c8bf650f more-testing 2022-02-19 12:43:56 -07:00
Ben Hansen
c269f46a0e testing some things 2022-02-19 11:21:54 -07:00
Ben Hansen
b8b8444030 fixing some readme files and migrating the lighting code 2022-02-18 14:22:14 -07:00
Ben Hansen
6324e485f1 tutorials 1-9 now work with wasm 2022-02-18 13:36:21 -07:00
sotrh
214cdcfb68
Merge pull request #317 from rokonio/patch-1
Fix a typo
2022-02-18 11:27:34 -07:00
sotrh
5f98efef1f
Merge pull request #318 from dskkato/patch-1
Fix a minor typo in docs/tutorial13-threading
2022-02-18 10:39:22 -07:00
Daisuke Kato
c09edf860e fix typo in docs/tutorial13-threading
Propably -> Probably
2022-02-16 08:41:55 +09:00
Rokonio
2b9e09d19d
Fix a typo 2022-02-15 23:36:54 +01:00
Ben Hansen
82d50cba6c finally migrated tutorial9 code 2022-02-13 20:19:55 -07:00
Ben Hansen
9811c4037e troubleshooting wasm failure 2022-02-13 13:31:00 -07:00
Ben Hansen
05767326d9 tutorial 9 working on desktop 2022-02-05 11:00:28 -07:00
sotrh
eed8f014c2
Merge pull request #309 from jeffawang/remove-block-note
tut6: remove sentence about block decorator
2022-02-03 16:44:07 -07:00
sotrh
6a6a462484
Merge pull request #310 from mariankay/docs-surface-type-view
docs: surface: change frame.view to view
2022-02-03 16:43:19 -07:00
Marian Cichy
f17d27dabd docs: surface: change frame.view to view
`frame.view` does not exist in the whole tutorial and is probably a remant
from older versions. The text is actually referring to `view`
2022-02-02 15:53:06 +01:00
Jeff Wang
ed632adec8 tut6: remove sentence about block decorator 2022-01-31 19:46:28 -08:00
Ben Hansen
3492bb703f working on tutorial9 2022-01-25 19:54:21 -07:00
Ben Hansen
cbce0a546e experimenting with loader on tutorial9 2022-01-25 19:54:21 -07:00
Ben Hansen
16d82909e3 adjusted indent on tutorial2 2022-01-25 19:54:21 -07:00
Ben Hansen
2bb9be1660 tutorials 2-8 now have working web examples 2022-01-25 19:54:21 -07:00
Ben Hansen
1e5a88fbee fixes #289 2022-01-25 19:54:19 -07:00
Ben Hansen
a6f6a492e7 tutorial1 now has a web example 2022-01-25 19:52:36 -07:00
Ben Hansen
59f0ec16f0 migrated tutorial to use lib.r 2022-01-25 19:52:33 -07:00
sotrh
2ee7e082fa
Merge pull request #305 from yutannihilation/doc/const-vertex_attr_array
Add one more advice about vertex_attr_array! macro
2022-01-15 15:25:55 -07:00
sotrh
ed202350b6
Added code example directly
I added this in case the link breaks.
2022-01-15 15:25:27 -07:00
sotrh
4b837c08de
Merge pull request #304 from yutannihilation/remove-padding-indices
Remove a padding in INDICES
2022-01-15 15:15:24 -07:00
Hiroaki Yutani
4368358033 Add one more advice about vertex_attr_array! macro 2022-01-13 22:27:54 +09:00
Hiroaki Yutani
c06e1365cb Tweak description 2022-01-11 23:02:19 +09:00
Hiroaki Yutani
8c6c491b11 Remove padding in INDICES 2022-01-11 22:50:25 +09:00
sotrh
46e8e882d4
Merge pull request #302 from yutannihilation/remove-is-updown-pressed
Remove is_{up,down}_pressed
2022-01-10 17:16:58 -07:00
sotrh
3665859639
Merge pull request #301 from rhysd/fix-tutorial-7
Remove unused constant `NUM_INSTANCES`
2022-01-10 17:15:21 -07:00
sotrh
9cb9f7fe12
Merge pull request #303 from yutannihilation/improve-description-about-webgpu-and-wgsl
Update the description about WGSL
2022-01-10 17:14:37 -07:00
Hiroaki Yutani
47d822865e Update the description about WGSL 2022-01-11 08:51:47 +09:00
Hiroaki Yutani
72446bc9ee Remove is_{up,down}_pressed 2022-01-11 07:48:51 +09:00
rhysd
bd3ad57387 fix typo 2022-01-11 02:59:40 +09:00
rhysd
853d44e257 remove unused constant NUM_INSTANCES 2022-01-11 02:59:31 +09:00
sotrh
e760f9f50c
Merge pull request #287 from rhysd/fix-typos
Fix some typos
2022-01-10 09:32:53 -07:00
sotrh
48c38de653
Merge pull request #290 from TonalidadeHidrica/fix-typo
Fix typos
2022-01-10 09:30:18 -07:00
sotrh
e33b8ab911
Merge pull request #292 from rhysd/old-field-name
Fix old field name
2022-01-10 09:29:53 -07:00
sotrh
8876f93c3d
Merge pull request #293 from rhysd/fix-tutorial-5
Fix `wgpu::SamplerBindingType` is now parameter of `wgpu::BindingType::Sampler`
2022-01-10 09:28:41 -07:00
sotrh
1104818da0
Merge pull request #295 from CatCode79/patch-1
Fix to Link to the "alignment" page
2022-01-10 09:28:04 -07:00
sotrh
d5074ecb79
Merge pull request #298 from yutannihilation/doc/include_wgsl
Mention include_wgsl!
2022-01-10 09:27:31 -07:00
sotrh
0cd2314a36
Merge pull request #297 from yutannihilation/fix/update-wgpu-doc-link
Update the links to wgpu's docs
2022-01-10 09:26:55 -07:00
Hiroaki Yutani
2dcbfbe01e Mention include_wgsl! 2022-01-10 09:57:18 +09:00
Hiroaki Yutani
6224fe670f Link to the latest wgpu's docs 2022-01-09 23:03:53 +09:00
Andrea Postal
1a7c038eb4
Fix to Link to the "alignment" page
Fix to ` Link to the "alignment" page is broken #291 ` issue
2022-01-07 20:02:07 +01:00
rhysd
c81dfd34ba fix wgpu::SamplerBindingType is now parameter of wgpu::BindingType::Sampler 2022-01-04 20:38:35 +09:00
TonalidadeHidrica
0b9840e1ec Fix typo: w -> we 2022-01-04 03:44:01 +09:00