Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

setFloat of PostProcess effect in a PG with 2 scenes

$
0
0

Me and Andy (@Pryme8) have been trying to get a very plain post process to work in the back scene of a PG that has 2 scenes:

http://www.babylonjs-playground.com/#BLNIDI#19

It seems line 50 results in a webgl error when the value of time is set to anything other than 0, in any sort of render loop / timeout / interval.

It works fine when it's set to any float value if it's defined right after creating the PostProcess instance (possibly because it's before the scenes are rendered?)

uwPass.getEffect().setFloat('time', time);

The error can only be noticed when loading the PG:

Quote

WebGL: INVALID_OPERATION: uniform1f: location not for current program

I suppose that's because of:

Quote

WebGL: too many errors, no more errors will be reported to the console for this context.

I'm stating the obvious, but that means that error won't be logged when modifying the PG and running, you'll need to save it and reload the page.

 

When scene's camera is passed to the post process instead of backScene's camera, the error is not thrown:

http://www.babylonjs-playground.com/#BLNIDI#20


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>