This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ANTIALIASED PIXEL ART SAMPLING EXAMPLE | |
| //old code by Robert Cummings, thanks to Ben Golus for the original techniques + the internets etc (this isn't copyrighted code!) | |
| //all this code is considered open source - do what you want, just don't bother charging for it, share with people | |
| //each texel is a flat plateau of solid colour. | |
| //blending occurs at transition band at texel borders, sized to cover one screen pixel, no shimmer/blur/crawl etc... | |
| //this effectively turns the bilinear filter into a box filter exactly one screen pixel wide, centered on the texel boundary. | |
| //texture and sampler should use BILINEAR filtering + CLAMP or WRAP as needed, no mipmaps!!! | |
| //point filtering will NOT work | |
| //should work with on UE (custom nodes), Unity, Godot / most engines with a few tweaks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace Entropedia | |
| { | |
| public class SetDate : MonoBehaviour | |
| { | |
| public Sun sun; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This file is in the public domain. Where | |
| // a public domain declaration is not recognized, you are granted | |
| // a license to freely use, modify, and redistribute this file in | |
| // any way you choose. | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // Unity remake of a fake volumetric light glow effect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Name" { | |
| Properties { | |
| _Name ("display name", Range (min, max)) = number | |
| _Name ("display name", Float) = number | |
| _Name ("display name", Int) = number | |
| _Name ("display name", Color) = (number,number,number,number) | |
| _Name ("display name", Vector) = (number,number,number,number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public class TerrainDetector | |
| { | |
| private TerrainData terrainData; | |
| private int alphamapWidth; | |
| private int alphamapHeight; | |
| private float[,,] splatmapData; | |
| private int numTextures; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| static class GameSettingsProvider | |
| { | |
| [SettingsProvider] | |
| public static SettingsProvider CreateGameSettings() | |
| { | |
| var provider = new SettingsProvider("Game/Settings", SettingsScope.Project) | |
| { | |
| guiHandler = (searchContext) => | |
| { |