Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
[nzsl_version("1.1")] module; import VertOut, VertexShader from Engine.FullscreenVertex; option HasTexture: bool; //< a compilation constant set by the application [layout(std140)] struct Parameters { colorMultiplier: vec4[f32] } external { [binding(0)] params: uniform[Parameters], [cond(HasTexture), binding(1)] texture: sampler2D[f32] } struct FragOut { [location(0)] color: vec4[f32] } [entry(frag)] fn main(input: VertOut) -> FragOut { let output: FragOut; output.color = params.colorMultiplier; const if (HasTexture) output.color.rgb *= texture.Sample(input.uv).rgb; return output; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)