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
vec4 fragPosLightSpace = lightSpaceMatrix * worldPos; | |
float visibility = 1.0 - calcShadow(fragPosLightSpace); | |
vec3 rgb = emissive + (ambient + visibility * (diffuse + specular)) * color; | |
float calcShadow(vec4 fragPosLightSpace) | |
{ | |
vec3 screenSpacePos = fragPosLightSpace.xyz / fragPosLightSpace.w; | |
float bias = 0.005; | |
float fragDepth = screenSpacePos.z - 0.005; |
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
class AbilitySelectedEvent : Event | |
{ | |
public uint abilityId; | |
public uint playerId; | |
} | |
// registering | |
EventManager eventManager; | |
eventManager.RegisterForEvent<AbilitySelectedEvent>(this, (AbilitySelectedEvent payload) => | |
{ |
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.Concurrent; | |
using UnityEngine; | |
public class Event | |
{ | |
public uint ID; | |
}; | |
public delegate void EventDelegate<E>(E payload) where E : Event; |
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
[ | |
"AlchemistNPC", | |
"AmmoboxPlus", | |
"AsphaltPlatforms", | |
"AutoTrash", | |
"BannerBonanza", | |
"BossChecklist", | |
"Boxinator", | |
"CalamityMod", | |
"CheatSheet", |
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
<?php | |
class Model | |
{ | |
public $data; | |
function __construct() | |
{ | |
# | |
} |
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
glutInit(&argc, argv); | |
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); | |
glutInitWindowSize(400, 300); | |
glutCreateWindow("Hello World"); | |
glutIdleFunc(&update_fade_factor); | |
glutDisplayFunc(&render); |
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
public class FSpriteHolesShader : FShader | |
{ | |
private Texture _hole0Texture=null; | |
private Vector4 _hole0LocalToUVParams; | |
private Vector4 _hole0MatrixABCD; | |
private Vector4 _hole0MatrixTxTy; | |
private Vector4 _hole0UVRect; | |
private FSprite _hole0Sprite=null; | |
static private Vector4 _screenParams; |