robcupisz / lightshafts Goto Github PK
View Code? Open in Web Editor NEWA light shafts (volumetric shadows) effect for Unity.
A light shafts (volumetric shadows) effect for Unity.
Hi, on Dark scenes it is possible to see the banding, even with higher resolutions.
Which shader you think I can change to reduce it (as you said dithering)?
Regards
Rodrigo
Hello! In the Links section of README.md, there is a link to a technical paper with information.
The link appears to be dead though.
The link in question is: https://sfb716.icp.uni-stuttgart.de/uploads/tx_vispublications/espmss10.pdf
Hello.
I am trying to use Light Shafts with WaterPro DayTime (unity), but when I set the water to reflection mode or refraction mode the rays disappear.
Why does it happen ?
The light shafts no longer work on Unity 5.3.3+, they are invisible :(
In the unity editor and player everything is ok, but on the actual mobile device it doesn't show at all. I tried fiddling with the lighting settings for mobile player and didn't come up to a solution. Is this restricted on mobile in anyway or am i just stupid ?
Currently the package isn't working in unity 4.6 beta
Incridible work btw!
When building my project I get the following error:
Shader error in 'Hidden/Coord': '|' : wrong operand types no operation '|' exists that takes a left-hand operand of type 'bool' and a right operand of type 'bool' (or there is no acceptable conversion) at line 67 (on gles)
I'm seeing the following error when adding light shafts to a spotlight, using Unity 5.1.1:
Failed getting triangles. Submesh topology is lines or points.
UnityEngine.Mesh:get_triangles()
LightShafts:InitSpotFrustumMesh() (at Assets/LightShafts/LightShafts.Resources.cs:219)
LightShafts:InitResources() (at Assets/LightShafts/LightShafts.Resources.cs:287)
LightShafts:OnRenderObject() (at Assets/LightShafts/LightShafts.cs:208)
Line 219 of LightShafts.Resources.cs is:
if (m_SpotMesh.triangles == null || m_SpotMesh.triangles.Length != 36)
And I found that adding another check to the beginning of that if statement seemed to sort it out:
if (m_SpotMesh.GetTopology(0) != MeshTopology.Triangles || m_SpotMesh.triangles == null || m_SpotMesh.triangles.Length != 36)
This does fix the error, though I'll leave it up to @robertcupisz as to whether it's the correct fix.
Hi,
Do you know any way to be makin the voumetric fog with a cut out shader ?
Since you said it need to write to depth texture and standard cutout doesn't.
Thanks !
Baptiste
I started using the Light Shafts in our project and found out, that in certain viewing angles the LightShafts disappear.
I was able to reproduce this issue with the following setup:
I had a ventilation duct on the top part of a wall (higher than the player camera) and placed a spot light in it, shining out of it. So the light had a -90degree rotation shining directly to the side.
If I now walked directly infront of it, looking right in the center of the light shafts, they disappeared.
Would love to use this asset in the project, but this is a no go.
Is there anything I can do to prevent this fromo happening?
I will provide some screenshots/video if I get home from work (if needed)
Hello, I use the new multi scene editing in unity 5.3.1p1 and find a bug. LightShaft is latest version.
I put LightShaft and light in scene A, scene A has no camera, then put main camera in scene B. I set the lightshaft use camera from scene B. But every time I run the game in editor, there is a camera added into scene A. So there will be many cameras in scene A after many times playing.
I tried this on Unity 4.6.3 & 4.6.4 both on OSX 10.10 and Windows 7.
Windows 7 worked fine, but OSX can't see the light beam, and 100% crash when switch to game view.
I tried this on mac last year and worked fine ( it was around unity 4.5.4 ).
Is it possible to make it work on OSX with unity 4.6.4 ?
light shafts not shown in the scene/editor view, only in game view
(because the editor script is js not cs?)
I have a problem with using LightShaft with “forward doubleside shader”.
I want to use a custom forward double side (cull off) shader for plane object lit by back light with LightShaft. If I make LightShaft enable, backside face became transparent. For several reasons, I can’t avoid using this forward shader (but render path is set deferred).
If I set deferred double side shader , it seems to be no problem. What is the reason of this problem and how can I fix?
(Unity5.5
)
Hello and thank you for this great stuff!
I don't get it work on my VR Project with SteamVR and my HTC Vive.
In the unity Window it works great, but not on my Headset.. i don't see anything :(
Is there any workarround or something?
Thank you!
Hi I tried.
It's working on Unity. But didn't work on my mobile. So I'm curious that is it supposed to work on mobile?
Thanks in advance!
Is there a way to make the "volume start" closer to the origin of the light? The further the spot light range goes the further the volume start is from the origin of the light. I would like to to start as close as it can to the origin of the light.
I tried on both Mac and PC. the light shafts clear when the play button is hit until i manually select the lights in the project window while the game is running. The Shafts are also off when i build a stand alone.
Maybe i can force this in the script somewhere?
work fine with standalone platform, but on android platform this didn't work.
Hi, I'm trying to use light shafts with a mesh that is animated via vertex shader, and the shafts don't seem to be conforming to the changing mesh. Is this expected? If so, could you offer any pointers as to how I could go about getting this to work? Thanks!
Been trying to get the light shafts to work with single pass stereo but unable to do that so far. Is it trivial to add support for that?
Very nice package that really helps creating interesting atmospheres. It seems however that there are strange black triangles that appear for some reason I cannot fully explain. In the following screenshot they are not all produced by the same light source.
It it maybe clearer when animated:
Any idea of what could be causing this?
EDIT: It seems to happen only at the edge of the light projection frustum. Here’s a more useful GIF:
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.