mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 04:28:59 +02:00
Mark px shaders dirty on change
This commit is contained in:
parent
4dad797e20
commit
27884b26e9
1 changed files with 5 additions and 1 deletions
|
@ -101,6 +101,7 @@ bool Procedural::parseUrl(const QUrl& shaderUrl) {
|
|||
}
|
||||
|
||||
_shaderUrl = shaderUrl;
|
||||
_shaderDirty = true;
|
||||
|
||||
if (_shaderUrl.isLocalFile()) {
|
||||
_shaderPath = _shaderUrl.toLocalFile();
|
||||
|
@ -230,7 +231,10 @@ void Procedural::prepare(gpu::Batch& batch, const glm::vec3& position, const glm
|
|||
if (replaceIndex != std::string::npos) {
|
||||
fragmentShaderSource.replace(replaceIndex, PROCEDURAL_BLOCK.size(), _shaderSource.toLocal8Bit().data());
|
||||
}
|
||||
//qDebug() << "FragmentShader:\n" << fragmentShaderSource.c_str();
|
||||
|
||||
// Leave this here for debugging
|
||||
// qDebug() << "FragmentShader:\n" << fragmentShaderSource.c_str();
|
||||
|
||||
_fragmentShader = gpu::Shader::createPixel(fragmentShaderSource);
|
||||
_shader = gpu::Shader::createProgram(_vertexShader, _fragmentShader);
|
||||
|
||||
|
|
Loading…
Reference in a new issue