valvesoftware / the_lab_renderer Goto Github PK
View Code? Open in Web Editor NEWValve’s VR renderer used in The Lab (Valve’s VR launch title for the HTC Vive).
License: BSD 3-Clause "New" or "Revised" License
Valve’s VR renderer used in The Lab (Valve’s VR launch title for the HTC Vive).
License: BSD 3-Clause "New" or "Revised" License
The Lab Renderer Valve’s VR renderer used in The Lab (Valve’s VR launch title for the HTC Vive). This is the set of scripts and shaders that drove rendering in The Lab. It is a forward renderer with support for up to 18 dynamic shadowing lights in a single pass with MSAA enabled, and it included the Adaptive Quality system that dynamically adjusts rendering resolution to maintain framerate in VR. Requires Unity 5.4.b15 or newer. More information: http://steamcommunity.com/games/250820/announcements/detail/604985915045842668
It appears that the lighting model in the shaders is based off of the phong lighting that Unity had at the time The Lab Renderer was created. Unity now has the more physically correct GGX lighting which is crucial when working with PBR in things like Substance Painter, as a lack of consistency makes it impossible to make things look right. Is there any way to use GGX with this renderer?
There may be a memory leak related to the Scene Auto Rendering option. A few developers on my team have this feature crash the editor pretty quick with memory spikes with this on. Doesn't happen on every machine, but seems drastic when it does. Turning this option off fixes the issue immediately.
There may be also memory leaks related to lights. I've had memory start leaking / stop leaking when I toggle different lights on or off.
Does the "Culling Mask" not work with the Valve Realtime Light? I see that the "Shadow Cast Layer Mask" prevents things from casting shadows, but there's no way to prevent things from receiving light, like the basic Unity light?
Unless I'm missing something?
The shadows disappear when the LOD in a LOD group is changed, as the LOD1 and LOD2 could not cast shadows at all.
This problem happened with objects under different LODs, with LOD0 with shadows and other LODs within the same layer with no shadows at all.
Builds are turning Pink on Valve VR standard shader (and other lab shaders)
Previously I've been using 5.4.0p1, and recently got an error:
http://i.imgur.com/HGruBq2.png
Is there a known bug here? A known fix?
I've seen previously that using 'additive' does the same, however I am not using additive and actually even on a new scene with nothing in it it still occurs, which leads me to believe the shader is at fault
EDIT: Ok... problem solved perhaps. I commented out the entire IF statement surrounding the bug and it appears to work. As I have no real idea what it does (not really) I don't know if this breaks anything else... but for now I'm happy.
Supporting light cookies with a Valve Realtime Light would be a nice addition, unless there's currently a way to do it and I'm missing it.
When i use adaptive quality settings and the rendering scale changes, the image is no longer warped correctly on the headset, meaning the eyes don't match up, and only a portion of the screen is displayed. What am I doing wrong?
Solution so far is to just turn off adaptive rendering, which leads to surprisingly more performance and a usable headset.
I just upgraded to Unity 5.5 and I'm hitting an issue with the latest Unity 5.5.0f3 and 5.5.0p1, if I have Stereo Rendering Method on "Single Pass", the left eye is OK, but the right eye is not warped correctly and is offset a big amount. So it is impossible for both eyes to focus and merge the image.
Turning it to "Multi Pass (Slow)" works just fine, but I'm guessing I lose a lot of performance. Has anyone else seen this issue? This is with the other adaptive quality fix (Move UpdateAdaptiveQuality() from OnPreCull to LateUpdate)
Thanks!
On unknown hardware / software configurations, adaptive rendering seems to underestimate the cost of rendering and causes constant frame loss due to oversampling.
I can reproduce the problem in ZenBlade with adaptive sampling turned on with a Titan Black on Windows 10.
Are there plans to update this repo with the code used in the recent update to The Lab?
https://steamcommunity.com/games/450390/announcements/detail/1589129608838466210
When i try to put a Lab Renderer material onto UI Text, it just turns black no matter what color the material is. Does anyone have a working example they could share?
Without the material, the text is not properly shadowed.
Thanks!
Whe I Import The Lab to unity,I clicked "convert Active Materials to valve Shaders" ,I found that all materias, shader in my secene had been transformed to lucency state,i cound't see most of materials in secene(in Editor ),could u please help me find how to fix this issiue? thx!
Can't seem to disable specular Fresnel highlighting effect without affecting the cubemap scaler. I know it was added to make things pop, but there are many things that I don't want to add it too as the effect is too strong. I was able to affect the flFresnelExponent to change falloff of the effect, but it doesn't affect its contribution. Is there an easy way to disable the effect entirely?
There seems to be an issue in Unity 5.5.0b6 where whenever Adaptive Quality changes one step, the whole screen is rendered with distorted projection for one frame.
Btw, fantastic job on The Lab Renderer! I see amazing framerate and also happy to note that image effects work in the new Unity beta.
Hello,
It looks like I can't get shadows to work properly with the lab renderer and unity 5.5. This is true even with the example scenes provided by valve.
Most of the time there is no shadow but there are certain limited situations where I can get some small area of shadow with weird artifacts:
Sorry but have no idea how rendering/shading/graphic programming works (I mostly understand logic programming/application) so it's hard for me to look at the source code and see where the problem is but I can provide any information that you might need.
In Unity 5.4.2f2, the valve shader isn't illuminated by realtime lights, but only after scene load and only if there are shadows involved.
The screenshots attached show a scene on first run, then the same image on loading a new scene, then the same image on the new scene after turning off shadows on the torch.
I've been able to get lights to work by:
-switching shaders
-switching the 'receive shadows" to 'off' on the valve shader material
-turning off the shadows on the torch
I've been unable to find anything else causing the issue. Even loading a duplicate of the same scene is broken on scene load!
Loading has been done via SceneManager.LoadScene and SceneManager.LoadSceneAsync, both single and additive. Same issue in all loads.
Does anyone know a fix for this? Shadows are pretty important for my game.
When a project with the lab renderer is opened on a mac unity editor, anything using the steam material is pink as if the material is missing. Even if the build target is set to windows 64bit. This makes it impossible for team members with macs to work on non-vr parts of the game (level design, adding models, scripted events, etc..).
Image effects have weird zoom in/out and other undefined behavior with adaptive rendering turned on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.