Creating Realtime Mirror


#1

I’m trying to create a realtime mirror in playcanvas using the following GLSL shader https://www.shadertoy.com/view/4sXGRH

I have no experience in GLSL shaders. It would be a great help if anyone can guide me to achieve the same mirror effect in playcanvas programmatically.


#2

Hi @Manoj_Raturi.

To make floor reflecting, you will need to render scene with camera that is positioned and rotated mirrored from actual camera using plane normal as mirror vector. Then you can use same texture to project on floor using shaders.
Start small, and learn bit by bit to move towards your desired target, developing usually doesn’t have easy and quick shortcuts.


#3

is there a demo scene on play canvas that shows how to perform a reflection on the ground or reflection probes?

a bit like this example :
https://doc.babylonjs.com/tutorials/how_to_use_reflection_probes

or plays canvas does not yet have this functionality?


#4

The reflection is not real reflection .It is duplicate another one .


#5

so no examples for the moment thank you


#6

Yes I have example .


#7

have you got a link to the project to fork


#8

https://playcanvas.com/project/487886/overview/black-diamond