ShaderLang icon indicating copy to clipboard operation
ShaderLang copied to clipboard

NZSL (Nazara Shading Language) repository - A shader language inspired by Rust and C++ which compiles to GLSL or SPIRV (without any additional dependency)

Results 28 ShaderLang issues
Sort by recently updated
recently updated
newest added

Is it possible to define recursive functions in NZSL? I normally use [macro expansion](https://stackoverflow.com/a/77470186/975097) to define recursive functions in shading languages, but I wish they had built-in support for recursion.

question

Add support for bit operators (&, |, ~, ) on vector of integers. 1. [ ] Implement bitwise operators to the `nzsl::Vector` class (component-wise), beware of right shifting on integer...

enhancement
good first issue

Currently, constant propagation on binary expressions requires to know both operands, but there are cases than can be optimized when knowing only one operand: - `a + 0` -> `a`...

enhancement

Currently, the library part of NZSL cannot be used in other languages due to its C++ API. It would be a good thing to provide a C wrapper, even minimalistic,...

enhancement
good first issue

Currently, only builtin types (bool, f32, i32, u32) and f32/i32 vectors of size from 2 to 4 are handled as constants values, which allows constant propagation, to set them from...

enhancement

One drawback of NZSL is its massive use of options, which prevent the early generation of GLSL and SPIR-V. Something we could do to help with this is to give...

enhancement
question

Currently, type deduction only occurs for variable declarations: ```rs let x = 42.0; ``` is equivalent to ```rs let x: f32 = 42.0; ``` It would be great to allow...

enhancement

Currently, options are treated like unknown values, or even unknown types. However, it would be pretty simple to handle cases where the value is known and validation / optimization can...

enhancement

Currently, this code compiles correctly and shouldn't: ``` fn get_value() -> i32 { return 42.666; //< should trigger an error } ``` Also ``` fn get_value() -> i32 { return;...

bug
good first issue

It would be nice to support a `match` statement, but I'm unsure about the syntax that should be used. ```rs let x: i32; let result: i32; match (x) { //<...

enhancement
good first issue
question