mrdoob/three.js — Issue #1129: Getting World Matrix and viewInverse Matrix in shader?
Author: AlistairBraz
Created: 2012-01-18 15:25:45+00:00
State: open

First of all, thanks Mr.Doob and AlteredAqualia for all your work on the engine and the examples. Learned a tonne just from studying them. I am more used to doing shaders in HLSL and cgfx so was wondering if there was any way to get the world matrix and other ones in the shader? I tried looking at the Fresnel demo you had and had no idea how you were getting the camera position.

Here's my page and I have a fresnel of sorts working but is obviously broken as it is not considering the camera. In CGFX I would be getting this through the viewInverse[3] so any ideas on getting these matrices would be of so much help.