Most importantly, I've begun work on `omwfx` format. The grammar is pretty simple and I've implemented a recursive descent parser that utilizes the variant/optional c++17 features. The parser is almost complete, but needs some polish.
Here is a small example of what an omwfx file will look like. Note, block order is not important! There are a couple restrictions on code blocks but they are not limiting at all, simply version and extension macros are handled by the technique block. The technique name is defined by the filename.
Code: Select all
technique {
passes = pass1,pass2(vec2(1,0)), pass1, pass2(vec2(0,1));
version = 150;
extensions = GL_EXT_gpu_shader4, GL_EXT_gpu_shader5;
}
render_target {
// render all statics and particles with rgb16g format as a forward pass, available as a sampler in all passes
mask = statics,particles;
color_format = rgb16f;
}
sampler_1D lutTex {
source = "textures/lut.png";
wrap_s = repeat;
}
uniform_Vec4 foo {
default = vec2(1,2);
min = vec2(1,2);
max = vec2(10,20);
description = "controls some random thing";
static = true; // static ones are const, non-static onces are literal uniforms which can be set with something like a lua-interface
widget = slider; // defining a widget automatically adds this to in-game configuration menu
}
vertex pass2 {
// use forward pass we defined earlier as a sampler
uniform sampler2D render_target;
// arbitrary valid GLSL code
}
fragment pass2(vec2 blurDirection) {
// arbitrary valid GLSL code
}
vertex pass1 {
// arbitrary valid GLSL code
}
fragment pass1() {
// arbitrary valid GLSL code
}