#Can not use Light shadow When I use a wgsl to render?

36 messages · Page 1 of 1 (latest)

ashen island
#

I use wgsl for my mesh. when i what to use DirectionalLight shadows_enabled: true, just get a error:

Caused by:
    In Device::create_render_pipeline
      note: label = `prepass_pipeline`
    error matching VERTEX shader requirements against the pipeline
    location[1] Float32x2 interpolated as Some(Perspective) with sampling Some(Center) is not provided by the previous stage outputs
    input type is not compatible with the provided Uint32

How can i fix it.
code it in https://github.com/zzhgithub/just_join

GitHub

Contribute to zzhgithub/just_join development by creating an account on GitHub.

twin plover
#

I've used this to get wireframes to always render in front: #rendering message
May or may not be a suitable solution in this case depending on what you are looking for.
It would go in the fn specialize() for your wireframe material

ashen island
#

Thank you I will try.

twin plover
ashen island
#

lol I git it .

#

I change the UVS location. there is no error happen. but i also not see shadow. Why?

twin plover
ashen island
#

fix it

#

Thank you

#

and a addtional question why Slow reflection is not realistic. The shaded part is too dark to have floodlight.

twin plover
ashen island
#

yes

#

Your understanding is too strong

twin plover
#

I think that's from the AmbientLight

#

Without raytracing or other methods the renderer can't know what is occluded from ambient light

#

This is probably the specular component (rough reflection)

ashen island
#

OK I will try

twin plover
#

You can turn down the ambient light if you'd like

#

it's a resource

ashen island
#

try to add prb_input params?

twin plover
#
App::new()
    .insert_resource(AmbientLight {
        color: Color::WHITE,
        brightness: 0.0,
    })
ashen island
#

I use DirectionalLight it that mater?

#

ok

#

Wait my try

#

should I change the brightness ?

twin plover
#

I would probably keep a little bit

#

you could maybe also use another directional light but shadowless pointing from the top down, not straight down, but opposite your other directional light

#

Then you'll get some light in the shadows but not when looking at low grazing angles

#

This can act as a replacement of the ambient light.