This file contains 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
var useLegacyShader = false; | |
var ShaderResources = { | |
blurPixelShader:"#ifdef GL_ES\nprecision mediump float;\n#endif\n\n// Samplers\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\n// Parameters\nuniform vec2 screenSize;\nuniform vec2 direction;\nuniform float blurWidth;\n\nvoid main(void)\n{\n float weights[7];\n weights[0] = 0.05;\n weights[1] = 0.1;\n weights[2] = 0.2;\n weights[3] = 0.3;\n weights[4] = 0.2;\n weights[5] = 0.1;\n weights[6] = 0.05;\n\n vec2 texelSize = vec2(1.0 / screenSize.x, 1.0 / screenSize.y);\n vec2 texelStep = texelSize * direction * blurWidth;\n vec2 start = vUV - 3.0 * texelStep;\n\n vec4 baseColor = vec4(0., 0., 0., 0.);\n vec2 texelOffset = vec2(0., 0.);\n\n for (int i = 0; i < 7; i++)\n {\n baseColor += texture2D(textureSampler, start + texelOffset) * weights[i];\n texelOffset += texelStep;\n }\n\n gl_FragColor = baseColor;\n}", | |
convolutionPixelShader:"#ifdef GL_ES\nprecision mediump float;\n#endif\n\n// Samplers\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\ |
This file contains 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
#include "SDL.h" | |
#include "Game.h" | |
#include "Graphics/SpriteBatch.h" | |
#include "Vector2.h" | |
#include "Color.h" | |
#include "Graphics/Texture2D.h"; | |
using namespace Atlantis::Framework; | |
using namespace Atlantis::Framework::Graphics; | |
using namespace Atlantis::Framework::Input; |
This file contains 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
TEMPLATE = app | |
CONFIG += console | |
QMAKE_CXXFLAGS += -std=c++11 | |
CONFIG -= app_bundle | |
CONFIG -= qt | |
win32 { | |
INCLUDEPATH += ../ThirdParty/windows/include | |
LIBS += -LC:../ThirdParty/windows/lib -lSDL2 -lSDL2_image -lSDL2_ttf | |
} | |
unix:!macx { |
This file contains 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
// The Game class | |
var TilemapGame = function () { | |
Atlantis.GameApplication.call(this, 640, 480); | |
this.content.rootDirectory = "Content/"; | |
this.spriteBatch = new Atlantis.SpriteBatch(this.graphicsDevice); | |
this.tilemap = null; | |
this.camera = new Atlantis.Camera2D(); | |
this.player = new Atlantis.Sprite("Player.png"); | |
this.player.move(15, 25); | |
this.camera.follow(this.player); |
This file contains 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
typeof(+undefined|0) | |
typeof(+NaN|0) | |
typeof(+null|0) | |
typeof(+0|0) | |
typeof(+[]|0) | |
typeof(+{}|0) | |
typeof(+"2"|0) | |
typeof(+1|0) | |
// +yourValue|0 |
This file contains 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
'use strict'; | |
window.onload = function () { | |
var canvas = document.getElementById("renderCanvas"); | |
var engine = new BABYLON.Engine(canvas, true); | |
var scene = new BABYLON.Scene(engine); | |
// CAMERA | |
var camera = new BABYLON.ArcRotateCamera("ArcRotateCamera", 1, 0.8, 10, new BABYLON.Vector3(15, 1, 15), scene); | |
camera.minZ = 0.1; |
This file contains 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
bootrec /fixmbr | |
bootrec /fixboot | |
# or | |
bootsect /nt60 sys /mbr # (can add /force at the end) |
This file contains 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
float4x4 World; | |
float4x4 View; | |
float4x4 Projection; | |
float4x4 lightView; | |
float4x4 lightProjection; | |
float3 lightPosition; | |
float3 lightRadius = float3(100.0, 100.0, 100.0); | |
float shadowMapSize = 512; | |
float bias = 7.0 / 1000.0; |
This file contains 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
float4x4 World; | |
float4x4 View; | |
float4x4 Projection; | |
struct VertexShaderInput | |
{ | |
float4 Position : POSITION0; | |
}; | |
struct VertexShaderOutput |
This file contains 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
git clone --depth=1 https://provider.com/user/repo.git |
OlderNewer