GithubHelp home page GithubHelp logo

valvesoftware / the_lab_renderer Goto Github PK

View Code? Open in Web Editor NEW
274.0 61.0 58.0 4.65 MB

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

C# 88.00% GLSL 12.00%

the_lab_renderer's Introduction

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

the_lab_renderer's People

Contributors

aaronleiby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the_lab_renderer's Issues

Still Uses Phong Shading and Not GGX

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?

Major Editor Memory Leaks

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.

Light Culling Mask

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?

LOD Group don't cast shadows

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.

Shader build error - Pink on export

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.

Cookies

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.

Changing render scale makes the headset warped incorrectly

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.

New Single Pass Rendering bug

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!

Adaptive rendering inaccurate on some machines.

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.

The Lab Render Import to unity 5.5.2f1

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!

How to disable Fresnel highlighting

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?

Adaptive Quality changes flicker in Unity 5.5.0b6

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.

No Shadows in Unity 5.50

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:

  1. For point lights, if the meshes are very close to the light (under 2 meters) and at a certain angle I always get a big "square" shadow right under the light source and objects near the light might cast shadows. Making any changes to the radius / other parameters doesn't change anything. None of the point light demo scenes provided by Valve cast shadows.
  2. For directional lights, no shadows 99% of the time but in the valve directional demo scene (with moving directional lights), there is shadow (with same strange behavior as the point light) when the light is at certain angles. Making any changes to directional light parameters in the valve screen doesn't fix the problem.

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.

Realtime lights stop illuminating on scene load, Unity 5.4.2f2

shadowbug1

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.

Renders everything as pink on Mac (with windows target)

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..).

Unity 5.4.0f3 and LR shading issue

I just switched our project to 5.4.0f3 and installed Lab Renderer. We are using Standard Unity shaders and when I do a convert, I get to errors in the console but the objects become invisible. I can convert back and it is fine.

convert1

convert2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.