Sign in to follow this  
gamefan

Disabling Reflection Texture has no FPS Win

Recommended Posts

Hi,

I want to offer user to disable reflections in my application so that there is gain in fps if he/she wishes to. I set ReflectionTextureEnabled in standardMaterial to false, the reflection is disabled but there is no performance gain. Removing the reflection texture from the mesh's material does increase the fps count. But I don't want to remove the reflection texture completely as user can toggle this back on again. Any strategies on how to do this?

http://www.babylonjs-playground.com/#DHPSEM#1

Share this post


Link to post
Share on other sites

It can be done but I will have to index the meshes in the render list so that they can be added back again once reflections is switched on. I was looking for a simpler solution. Is there a property that will completely disable reflections somewhere deep down in the babylon render loop?

Share this post


Link to post
Share on other sites
21 hours ago, gamefan said:

Is there a property that will completely disable reflections somewhere deep down in the babylon render loop?

I would think that StandardMaterial.ReflectionTextureEnabled would be the answer.  This appears to be a bug.

edit:

This fix increases the fps (maybe not completely):

http://www.babylonjs-playground.com/#DHPSEM#11

If you try setting StandardMaterial.ReflectionTextureEnabled to false after the scene is loaded you get a broken reflection:

http://www.babylonjs-playground.com/#DHPSEM#10

Share this post


Link to post
Share on other sites
13 hours ago, adam said:

If try setting StandardMaterial.ReflectionTextureEnabled to false after the scene is loaded you get a broken reflection:

Yeah, noticed this. Once set ReflectionTextureEnabled to false it has to be set to true to enable reflection again. That property remains unchanged in the browser session of pg.

#11 increases the fps, but will have to do this to all materials. Can I someway override a StandardMaterial function without editing the babylonjs file. Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.