base.camLens.setFov( )

Hello ~

I tried to paste ‘base.camLens.setFov(100)’ in glow shader sample.
The result in buffer isn’t sync with the current scence.

Any idea?? :blush:
Thanks…

Hmm, I can’t try it out myself right now, but does placing the setFov call before everything work?

i am not completely sure, however many shader codes create a hidden rendering buffer, which is using a camera as well. if this hidden camera is created before you change the fov. the parameter might not be copyed, thus the hidden camera has the old fov, making the rendering inconsistent.

using pro-rsoft’s hint will most probably fix the error.

I know it now.

Just add setFov for glowCamera like this .

        
# We have to attach a camera to the glow buffer. The glow camera
# must have the same frustum as the main camera. As long as the aspect
# ratios match, the rest will take care of itself.
glowCamera=base.makeCamera(glowBuffer,aspectRatio=base.getAspectRatio())
glowCamera.node().getLens().setFov(100)

My mistake… :stuck_out_tongue: