Final shader improvements (reopened)#2932
Final shader improvements (reopened)#2932RealEdwardS wants to merge 5 commits intof3d-app:masterfrom
Conversation
|
You are modifying libf3d public API! |
|
Still not ok ^^ |
0de55a3 to
9ab0a67
Compare
|
I can take care of it if you want. |
Yes please |
|
here it is: #2935 Please next time you want to merge/rebase on master, please reach out on discord and I will assist. |
|
Still working on this @RealEdwardS ? |
I think it's ready for review, unless there's something I'm missing? |
You need to ask for review if you want a review :) |
|
Well, first you have to recover the branch I provided to you here: #2935, do you need help with that ? |
51ed6ae to
f3e61bb
Compare
f3e61bb to
3d2d934
Compare
90c3272 to
58d6baa
Compare
I think I was able to fix everything? |
58d6baa to
5c2722c
Compare
| #include "vtkF3DRenderer.h" | ||
| #include <vtkRendererCollection.h> |
There was a problem hiding this comment.
| #include "vtkF3DRenderer.h" | |
| #include <vtkRendererCollection.h> | |
| #include "vtkF3DRenderer.h" | |
| #include <vtkRendererCollection.h> |
| #include "vtkObjectFactory.h" | ||
| #include "vtkOpenGLError.h" | ||
| #include "vtkOpenGLFramebufferObject.h" | ||
| #include "vtkOpenGLQuadHelper.h" | ||
| #include "vtkOpenGLRenderUtilities.h" | ||
| #include "vtkOpenGLRenderWindow.h" | ||
| #include "vtkOpenGLShaderCache.h" | ||
| #include "vtkOpenGLState.h" | ||
| #include "vtkRenderState.h" | ||
| #include "vtkRenderer.h" | ||
| #include "vtkShaderProgram.h" | ||
| #include "vtkTextureObject.h" | ||
| #include "vtkF3DRenderer.h" |
There was a problem hiding this comment.
vtk includes should be moved down and <>.
| f3d_test(NAME TestFinalShaderNegativeFileName DATA cow.vtp ARGS --filename --final-shader "vec4 pixel(vec2 uv){return vec4(vec3(1.0) - texture(source, uv).rgb, 1.0)\\\\\\\;}" UI) | ||
| f3d_test(NAME TestFinalShaderUndefined DATA cow.vtp ARGS --final-shader "undefined" REGEXP "Final shader must define a function" NO_BASELINE) | ||
| f3d_test(NAME TestFinalShaderCompilationFailure DATA cow.vtp ARGS --final-shader "vec4 pixel(vec2 uv){}" --verbose REGEXP " build the shader program" NO_BASELINE) | ||
| f3d_test(NAME TestFinalShaderTimeUniform DATA cow.vtp ARGS --final-shader "vec4 pixel(vec2 uv){return vec4(texture(source, uv).rgb * (0.5 + 0.5*cos(time+uv.xyx+vec3(0,2,4))), 1.0)\\\\\\\;}") |
There was a problem hiding this comment.
there is no time steps in cow.vtp, so im not sure this test is the right one ?
| /** | ||
| * Set/Get the total animation time (cumulative time of each frame being rendered) in seconds | ||
| */ | ||
| vtkSetMacro(TotalTime, double); |
There was a problem hiding this comment.
im not sure this is the right name for this property.
| vtkRenderer* r = s->GetRenderer(); | ||
| vtkOpenGLRenderWindow* renWin = static_cast<vtkOpenGLRenderWindow*>(r->GetRenderWindow()); | ||
| vtkOpenGLState* ostate = renWin->GetState(); | ||
| vtkF3DRenderer* ren = vtkF3DRenderer::SafeDownCast(renWin->GetRenderers()->GetFirstRenderer()); |
There was a problem hiding this comment.
| vtkF3DRenderer* ren = vtkF3DRenderer::SafeDownCast(renWin->GetRenderers()->GetFirstRenderer()); | |
| vtkF3DRenderer* ren = vtkF3DRenderer::SafeDownCast(r); |
| @@ -25,6 +27,7 @@ | |||
| vtkRenderer* r = s->GetRenderer(); | |||
There was a problem hiding this comment.
| vtkRenderer* r = s->GetRenderer(); | |
| vtkRenderer* ren = s->GetRenderer(); |
mwestphal
left a comment
There was a problem hiding this comment.
changes needed, but a review from meak too.
Describe your changes
Added time elapsed from the app start as a uniform property for final shader application.
Issue ticket number and link if any
Checklist for finalizing the PR
.github/workflows/versions.json, I have updateddocker_timestampContinuous integration
Please write a comment to run CI, eg:
\ci fast.See here for more info.