Minor fixes to previous commit

* Restrict clear to frame
* Restrict viewport to frame, as it used to be
* Moved viewport clearing to render code
This commit is contained in:
Emmanuel BENOîT 2017-11-10 22:12:24 +01:00
parent b98c2247ae
commit 7abf50ae61
2 changed files with 7 additions and 5 deletions

View file

@ -21,9 +21,6 @@
(call bloom-init)
(call combine-init)
(call fxaa-init)
(viewport 0 0 $width $height)
(clear 0 0 0 0)
)
(frame
@ -426,6 +423,9 @@
(fn fxaa-render (in-image)
(profiling "FXAA"
(main-output)
(viewport 0 0 $width $height)
(clear 0 0 0 0)
(use-pipeline pl-fxaa)
(use-texture 0 in-image smp-fxaa)
(uniforms prg-fxaa 2

View file

@ -335,7 +335,8 @@ class T_ClearInstrNode : public A_InstructionNode
public:
T_ClearInstrNode( T_InstrListNode& parent ) noexcept
: A_InstructionNode( OP_CLEAR , parent )
: A_InstructionNode( OP_CLEAR , parent ,
E_InstrRestriction::INIT )
{ }
void addComponent( P_ExpressionNode expr ) noexcept
@ -962,7 +963,8 @@ class T_ViewportInstrNode : public A_InstructionNode
public:
T_ViewportInstrNode( T_InstrListNode& parent ) noexcept
: A_InstructionNode( OP_VIEWPORT , parent )
: A_InstructionNode( OP_VIEWPORT , parent ,
E_InstrRestriction::INIT )
{ }
void setParameter( const E_Parameter p , P_ExpressionNode height ) noexcept