3#include "Application.hpp"
4#include "resources/Texture.hpp"
5#include "graphics/Program.hpp"
56 std::string
reload(
const std::string & shaderPath,
bool syncUniforms);
92 glm::vec4
value = glm::vec4(0.0f);
98 glm::vec3
value = glm::vec3(1.0f, 0.0f, 0.0f);
Window & window()
Definition: Application.cpp:95
Application with an interactive camera.
Definition: Application.hpp:89
Represent a GPU query, automatically buffered and retrieved.
Definition: GPUTypes.hpp:412
@ TIME_ELAPSED
Time taken by GPU operations between the beginning and end of the query.
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Configuration containing parameters for windows and renderers.
Definition: Config.hpp:113
Shader editor that can be used to tweak shaders on the fly, reloading them and exposing parameters fo...
Definition: ShaderEditor.hpp:13
std::vector< BoolOption > _flags
Predefined boolean parameters.
Definition: ShaderEditor.hpp:127
Texture _frame0
Content texture.
Definition: ShaderEditor.hpp:108
Texture _perlin3D
Random 3D RGBA periodic Perlin noise in [0,1].
Definition: ShaderEditor.hpp:124
Texture _directions
Random 3D directions on the sphere.
Definition: ShaderEditor.hpp:122
std::vector< ColorOption > _colors
Predefined color parameters.
Definition: ShaderEditor.hpp:131
double _startTime
Time at which the shader began to play.
Definition: ShaderEditor.hpp:135
bool _showGUI
Show the GUI parameters panel.
Definition: ShaderEditor.hpp:137
GPUQuery _timer
Timer for the user shader pass.
Definition: ShaderEditor.hpp:117
Texture _frame1
Content texture.
Definition: ShaderEditor.hpp:109
Texture _noise
Random 2D RGBA uniform noise in [0,1].
Definition: ShaderEditor.hpp:120
std::vector< FloatOption > _floats
Predefined float parameters.
Definition: ShaderEditor.hpp:129
uint _frame
Current frame ID.
Definition: ShaderEditor.hpp:133
void restoreUniforms()
Definition: ShaderEditor.cpp:704
Texture * _currFrame
Content texture indirection.
Definition: ShaderEditor.hpp:110
void draw() override
Definition: ShaderEditor.cpp:184
~ShaderEditor() override
Definition: ShaderEditor.cpp:677
Texture _perlin
Random 2D RGBA periodic Perlin noise in [0,1].
Definition: ShaderEditor.hpp:121
void loadShader(const std::string &path)
Definition: ShaderEditor.cpp:687
void update() override
Definition: ShaderEditor.cpp:295
Texture * _prevFrame
Content texture indirection.
Definition: ShaderEditor.hpp:111
Program * _passthrough
Passthrough program.
Definition: ShaderEditor.hpp:116
std::vector< VecOption > _vectors
Predefined vector parameters.
Definition: ShaderEditor.hpp:130
std::string reload(const std::string &shaderPath, bool syncUniforms)
Definition: ShaderEditor.cpp:657
std::string _compilationLog
Compilation log, will be displayed in a fixed panel if not empty.
Definition: ShaderEditor.hpp:140
std::string _shaderName
Name of the current shader (for display).
Definition: ShaderEditor.hpp:114
void displayUniforms(uint columnsCount)
Definition: ShaderEditor.cpp:550
const Texture * _fallbackTex
Display texture for non-2D inputs.
Definition: ShaderEditor.hpp:125
LayoutMode
GUI layout options.
Definition: ShaderEditor.hpp:102
@ VERTICAL
Panel at the bottom, result at the top.
@ FREEFORM
Panels can be freely moved around.
@ HORIZONTAL
Panel to the left, result to the right.
LayoutMode _layout
The GUI panel layout.
Definition: ShaderEditor.hpp:139
void resize() override
Definition: ShaderEditor.cpp:694
std::vector< const Texture * > _textures
List of all predefined textures.
Definition: ShaderEditor.hpp:119
void handleShortcuts()
Definition: ShaderEditor.cpp:509
std::string _shaderPath
Path of the current shader on disk.
Definition: ShaderEditor.hpp:113
bool _paused
Should time/frame count flow.
Definition: ShaderEditor.hpp:136
std::vector< IntOption > _integers
Predefined integer parameters.
Definition: ShaderEditor.hpp:128
double _currentTime
Current time.
Definition: ShaderEditor.hpp:134
std::unique_ptr< Program > _currProgram
Current shader program.
Definition: ShaderEditor.hpp:115
std::string generateParametersString(const std::string &prefix, bool exportValues)
Definition: ShaderEditor.cpp:771
Texture _noise3D
Random 3D RGBA uniform noise in [0,1].
Definition: ShaderEditor.hpp:123
bool _windowed
Should the result be displayed in a subwindow.
Definition: ShaderEditor.hpp:138
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Represent an OS window and its associated rendering context.
Definition: Window.hpp:14
Boolean flag parameter.
Definition: ShaderEditor.hpp:70
bool value
Uniform value.
Definition: ShaderEditor.hpp:72
std::string name
Uniform name.
Definition: ShaderEditor.hpp:71
RGB Color parameter.
Definition: ShaderEditor.hpp:96
glm::vec3 value
Uniform value.
Definition: ShaderEditor.hpp:98
std::string name
Uniform name.
Definition: ShaderEditor.hpp:97
Float parameter.
Definition: ShaderEditor.hpp:82
float value
Uniform value.
Definition: ShaderEditor.hpp:84
std::string name
Uniform name.
Definition: ShaderEditor.hpp:83
float min
Minimum possible value.
Definition: ShaderEditor.hpp:85
float max
Maximum possible value.
Definition: ShaderEditor.hpp:86
Integer parameter.
Definition: ShaderEditor.hpp:76
std::string name
Uniform name.
Definition: ShaderEditor.hpp:77
int value
Uniform value.
Definition: ShaderEditor.hpp:78
4D Vector parameter.
Definition: ShaderEditor.hpp:90
glm::vec4 value
Uniform value.
Definition: ShaderEditor.hpp:92
std::string name
Uniform name.
Definition: ShaderEditor.hpp:91