The multi-pass shader "trick" I recently mentioned appears to only work in the Editor. Uniform shader variables aren't updated more then once in standalone builds. Now I don't know what the correct behavior is, but it would be nice if it was consistent between Preview and Build.
I updated the beta today with a fix to the problem with updating uniform variables. If you set the new property "UpdateVarsOnEachUse" on the shader then the variables will be updated between models. You still need the trick of switching to another material though.
According to a discussion I found on a forum updating uniforms variables can sometimes be slow so it is not a recommended technique for updating hundreds of models every frame.
Yup, I meant "between each use" regardless of it is the same model or not.
The default in ZGE is to update shader-variables once every frame but there was an ifdef in the code that updated on every use when in the designer. It should behave consistent now.
Please post an exe if you get it working Kjell, I'd love to see those graphics in motion.
A build of the fur shader. Doesn't have any dynamics ( wind, gravity etc. ) .. so it looks a little static and spiky. The artifacts when looking through hairs on the edge of the object towards others is caused by the lack of Z-Sorting ( on mesh level ).
Plus a build of the volumetric spot light shader in action.
Turned out the spot shader didn't work on my laptop either Something to do with unrolling computed assignments to uniform vectors. Anyway, try downloading the re-uploaded Spot.zip from my previous post again, it should work now.
Yeah that works great,. and it looks very cool. So this 'fake' volumetric system, is it a series of progressively larger vesions of a light flare faceing the camera?
Somewhat like this (attached)? only sine I lack a 'face towards camera' function,. i am just adding a bunch of random jitter,. this experiment will make for a cool effect to be sure.., probably to be added to The Opium Wallpaper Wars.. , thanks Kj for the insperation!