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
/* Both vertex & fragment shaders (define VERTEX or FRAGMENT before loading each). | |
Looks like crash caused by indexing into uniform array. Crash goes away if: | |
1) replacing array indices [i] with actual constants (0 & 1) and removing index math, OR | |
2) removing unrelated ALU ops (' - viewpos'), OR | |
3) rewriting shader to not be unrolled; using for (int i = 0; i < 2; ++i) loop. | |
Shader by itself does not make any practical sense, I just simplified a more complex shader to smallest that still crashes. | |
Crashes inside PVR driver on iPad 2, iOS 4.3: |
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 "Hidden/ColoredNoise" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_NoiseTex ("Noise (RGB)", 2D) = "white" {} | |
} | |
CGINCLUDE | |
#include "UnityCG.cginc" |
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
//#define VERBOSE | |
/* *************************************************************************** | |
Copyright 2011 Calvin Rien | |
(http://the.darktable.com) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 "Bumped Specular" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | |
_Shininess ("Shininess", Range (0.03, 1)) = 0.078125 | |
_MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {} | |
_BumpMap ("Normalmap", 2D) = "bump" {} | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
/** | |
DownloadManager | |
@author koki ibukuro | |
*/ | |
public class DownloadManager : MonoBehaviour , System.IDisposable { | |
// using classes |
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 "Seventy Sevian/Pixelated" | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_Color ("Color", Color) = (1, 1, 1, 1) | |
_PixelCountU ("Pixel Count U", float) = 100 | |
_PixelCountV ("Pixel Count V", float) = 100 | |
} |
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 "Mobile/Illum VertexLit" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_Illum ("Illum (RGB)", 2D) = "black" {} | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 80 | |
Pass { |
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; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
public class WebWindow : EditorWindow { | |
static Rect windowRect = new Rect(100,100,800,600); | |
static BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; | |
static StringComparison ignoreCase = StringComparison.CurrentCultureIgnoreCase; |
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
float vFOVInRads = Camera.main.fieldOfView * Mathf.Deg2Rad; | |
float hFOVInRads = 2 * Mathf.Atan( Mathf.Tan(vFOVInRads / 2) * Camera.main.aspect); | |
float hFOV = hFOVInRads * Mathf.Rad2Deg; |
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; | |
using System.Collections; | |
/** | |
* This class attempts to force VERT- Field of view scaling. | |
* By default, Unity uses the HOR+ technique. | |
* | |
* http://en.wikipedia.org/wiki/Field_of_view_in_video_games#Scaling_methods | |
*/ |
OlderNewer