- Home /
Realistic Scope Effect?
Is there a way in making a scope have a sort of realistic effect like:
A) Having a visible curvature (not the lens object, the image) B) Having the renderTexture deformed/displaced/etc. as shown here
Do I need a code, or can i do this with materials/shaders, or what? Any help would be nice.
Answer by fafase · Oct 13, 2013 at 12:02 PM
A/ Look there http://docs.unity3d.com/Documentation/ScriptReference/Camera-layerCullDistances.html
B / I guess you could use render texture with a camera placed in front of the scope and a texture plane placed on the other end but that requires Pro.
Now i got it. I meant refraction, as they have in real life, like looking into a glass of water. Can you simuate that in unity using a shade or something?
You mean somehow like this : http://answers.unity3d.com/questions/358355/glass-refraction-shader.html
Another question, how do I use projection matrices for cameras? I found an idea to use one for a scope, but couldn't find any tutorials on how to use them.
Camera already has Projection/orthogonal projection. I don't think you can modify them, you choose one or the other and then you can modify some of the variable. But you won't be able to provide your own matrix to the camera.
Your answer
Follow this Question
Related Questions
How to bring reticles in different situations to the center of the camera? 0 Answers
FPS Aim Down Sights. Exact Position. 1 Answer
Problems with a shooting script 1 Answer
C# How to have weapon pickup 1 Answer
Gun Firing help? 2 Answers