gfx-rs / gfx_scene

deprecated
Apache License 2.0
15 stars 1 forks source link

Make an example #6

Closed kvark closed 9 years ago

kvark commented 9 years ago

A simple example could be generating a cube mesh (with genmesh), then making 2 entities out of it: one with transparent material, and the other one with opaque. A technique could have the same shader but different draw states generated for these cubes.

TODO:

Partially blocked by https://github.com/gfx-rs/gfx-rs/issues/575 . Until it's done, we aren't going to be able to provide any shader parameters by the material.

kvark commented 9 years ago

Actually, maybe we don't even want to provide ShaderParam in the material? Since it's the technique that generates the shader, it can be solely responsible for the parameters. The material can just store stuff (textures, colors, flags), while the technique will update the shader parameters.

kvark commented 9 years ago

The "alpha" example only demonstrates gfx_phase. Another one will be needed for gfx_scene.