Comments (2)
hi @danielchasehooper! For context we use .frag
or .fs
to distinguish fragment shaders from vertex shader (.vert
or .vs
). Files with .glsl
extensions are a bit ambiguous, that's why usually you see them when they are part of libraries like on https://lygia.xyz.
Solution, you could create file pairs that include the .glsl
counter part. For example:
shader.glsl
uniform vec2 u_resolution;
uniform float u_time;
void main() {
vec4 color = vec4(0.0,0.0,0.0,1.0);
vec2 uv = gl_FragCoord.xy/u_resolution;
...
gl_FragColor = color;
}
shader.frag
#include "shader.glsl"
This way:
- you don't have duplicate files
- glslViewer can track the changes of the original
.glsl
file - the
.frag
pairs can be easily generated programatically
from glslviewer.
we don't use the glsl
extension, #include
doesn't seem to work if the file doesn't have a glsl extension
It'd be useful if glslviewer had something like a --frag
param so that you can launch it like so:
glslviewer --frag shaderFileName
and it works with any extension.
from glslviewer.
Related Issues (20)
- Screenshots are twice the resolution specified
- Crash when clearing loaded models
- Spaces cauing issues without syntax errors
- Missing Include and installation docs for Suse
- glslViewer does not compile. HOT 8
- Setting Icon= in desktop file not always working HOT 1
- glslViewer looks for libavdevice.so.58, but I have 59 (Debian 12.1) HOT 4
- 3.2.2 win64 Record video rate not being set correctly HOT 1
- A way to pipe the image output directly to STDOUT instead of saving to a file in headless mode?
- Installer
- [bug] Segmentation fault within the `ncurses` console because of a race condition HOT 1
- [BUG] macro expansion causes syntax error
- Audio - NULL Capture Device on Mac HOT 1
- Raspberry PI 5 HOT 4
- Fullscreen window disappear when losing focus
- Unable to install [email protected] on scoop for windows build HOT 2
- Webcam input fails with "Failed to decode packet: End of file"
- "GLFW error 0x1000c: Cocoa: Regular windows do not have icons on macOS" on M1 mac HOT 2
- Native wayland support.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glslviewer.