yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

yumfix compiler bug lolf8cb9c4d6

master
5 files

files

README.md2.0 KiB
cube.mtl528 B
cube.obj499 B
main.cpp37.6 KiB
shaders.slang17.0 KiB

Model Viewer Example

This example expands on the simple Slang API integration from the "Hello, World" example by actually loading and rendering model data with extremely basic surface and light shading.

This time, the shader code is making use of various Slang language features, so readers may want to read through shaders.slang to see an example of how the various mechanisms can be used to build out a more complicated shader library. While the shader code in this example is still simplistic, it shows examples of:

The application code in main.cpp also shows a more advanced integration of the Slang API than that in the "Hello, World" example, including examples of:

It is perhaps worth taking note of the two things this example intentionally does not do: