All Projects → n-yoda → unity-sky-mesh

n-yoda / unity-sky-mesh

Licence: other
Render Skybox (sky sphere) by user-defined sky mesh.

Programming Languages

C#
18002 projects
GLSL
2045 projects

Projects that are alternatives of or similar to unity-sky-mesh

Anime4K
Makes it easy to encode a Anime using Anime4K with predefined encoding profiles!
Stars: ✭ 61 (+60.53%)
Mutual labels:  shaders
pipeVFX
A Visual Effects pipeline to manage jobs, shots and software assignment, with a simple asset manager. Its extensively integrated with CortexVFX and Gaffer. (and it builds booth, with support for Maya, Houdini and Nuke, if you have then installed!)
Stars: ✭ 47 (+23.68%)
Mutual labels:  shaders
Unity-Raymarched-Clouds-Simple-Wave
Unity project showcasing clouds volume rendering with raymarching, and a simple coloured wave.
Stars: ✭ 17 (-55.26%)
Mutual labels:  shaders
Unity3D-Plane-Clipping
Plane clipping shaders for Unity3D 5. Extends the Standard shader!
Stars: ✭ 84 (+121.05%)
Mutual labels:  shaders
nvjob-sky-shader-simple-and-fast
#NVJOB Dynamic Sky. Sky Shaders. Free Unity Asset.
Stars: ✭ 103 (+171.05%)
Mutual labels:  shaders
Messier87
A realtime raytracing blackhole renderer
Stars: ✭ 53 (+39.47%)
Mutual labels:  shaders
FNode
Tool based in nodes to build GLSL shaders without any programming knowledge written in C using OpenGL and GLFW.
Stars: ✭ 81 (+113.16%)
Mutual labels:  shaders
ShaderToy-Chrome-Plugin
Web extension for shadertoy.com
Stars: ✭ 159 (+318.42%)
Mutual labels:  shaders
GPU-Fog-Particles
Textureless fog particles using a highly customizable shader to attenuate noise values.
Stars: ✭ 303 (+697.37%)
Mutual labels:  shaders
viking-village-nvjob-sky-water-stc
Unity Viking Village + #NVJOB Water Shader, Dynamic Sky, STC (Demo). Unity Asset.
Stars: ✭ 29 (-23.68%)
Mutual labels:  shaders
unity-reaction-diffusion
(WIP) ✏️ Test of a Reaction-Diffusion simulated with a compute shader in Unity.
Stars: ✭ 25 (-34.21%)
Mutual labels:  shaders
sparksl-noise
minimum proof of concept about procedural noise generation in SparkAR's shader language (SparkSL).
Stars: ✭ 16 (-57.89%)
Mutual labels:  shaders
Unity3DShaders
Simple shaders for Unity3D that I created for games, for a challenge or following tutorials.
Stars: ✭ 17 (-55.26%)
Mutual labels:  shaders
stc8
#NVJOB STC8 v 3.2 (Custom shader for Unity SpeedTree 8)
Stars: ✭ 17 (-55.26%)
Mutual labels:  shaders
andromeda
GLSL-targetting embedded compiler, and OpenGL rendering engine.
Stars: ✭ 75 (+97.37%)
Mutual labels:  shaders
drawingwithcode
Drawing with code 😘
Stars: ✭ 28 (-26.32%)
Mutual labels:  shaders
RavEngine
A fast, easy to use C++20 3D game library for modern computers
Stars: ✭ 122 (+221.05%)
Mutual labels:  shaders
Super-Duper-Vanilla
A shader pack created to convey the style of the cancelled Super Duper Graphics Pack and other popular Minecraft titles.
Stars: ✭ 71 (+86.84%)
Mutual labels:  shaders
glsl-cos-palette
glsl function for making cosine palettes
Stars: ✭ 26 (-31.58%)
Mutual labels:  shaders
Spectrum
Audio visualization implementation on GPU
Stars: ✭ 34 (-10.53%)
Mutual labels:  shaders

SkyMesh shader for Unity

Do you want to use your own sky sphere model made in 3D modeling software (e.g. Blender, Maya)? In that case, the SkyMesh shader in this repository will be useful and efficient.

screenshot.png

How to use?

0. Think twice if you really need to render sky with your mesh.

In many cases, you should use Skybox instead, because SkyMesh is not suitable for GI. Unity can import several types of textures as Cubemaps. Even if you don't want to use Cubemaps, you'd better write your custom Skybox shader if the mapping between view direction and color (or texture coordinates) is simple enough.

1. Import your sky model, and create SkyMesh material.

You can also use builtin meshes. Create a material and select "Custom/SkyMesh" as the shader.

2. Choose radius of the sky. Finite or infinite?

Unity's skybox is rendered as a sphere of infinite radius when camera mode is perspective. This means sky appearance doesn't depend on translation of camera, but depends only on rotation and field of view of it. If you prefer this behaviour, uncheck Finite Radius checkbox of your material.

If your camera mode is orthographic or you prefer camera-translation-dependent sky, check Finite Radius checkbox.

In both cases, the sky mesh doesn't need to be within the view volume (read below).

3. Choose a renderer. MeshRenderer or CommandBuffer?

CommandBuffer

Attatch SkyMesh script to your main camera, and fill all the properties. "Camera Event" is recommended to be "After Image Effects Opaque" for efficiency.

MeshRenderer

Create GameObject, and attach MeshFilter with your mesh and MeshRenderer with the SkyMesh material. In order to avoid frustum culling, you have to scale the object or Mesh.bounds.

Features

The sky is rendered even if far away from the camera.

Sky meshes will be rendered even if the actual meshes are outside camera view volumes. The mesh is rendered as if it is stuck on the far plane of the volume. It doesn't cosume your depth buffer bits.

Efficient rendering order.

The rendering order is as efficient as builtin Skybox. The areas hidden by opaque objects are culled by depth test.

render.png

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].