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 is the main scene (args.outputs) | |
| Texture2D tex_scene : register(t0, space2); | |
| // this is the render target that represents the wind displacement map (args.outputs[:wind]) | |
| Texture2D tex_wind : register(t1, space2); | |
| // sampler for the main scene texture | |
| SamplerState sam_scene : register(s0, space2); | |
| // sampler for the wind displacement texture |
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
| Texture2D scene : register(t0, space2); | |
| Texture2D displacement_map : register(t1, space2); | |
| SamplerState sampler0 : register(s0, space2); | |
| SamplerState sampler1 : register(s1, space2); | |
| struct Input { | |
| float4 tex_color : COLOR0; | |
| float2 tex_coord : TEXCOORD0; | |
| }; |
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
| echo hello world > hello-ed.txt | |
| ed ./hello-ed.txt <<-S | |
| %s/hello/hi | |
| a | |
| good bye | |
| . | |
| wq | |
| S |
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
| Texture2D tex_scene : register(t0, space2); | |
| SamplerState sam_scene : register(s0, space2); | |
| struct Input { | |
| float4 tex_color : COLOR0; | |
| float2 tex_coord : TEXCOORD0; | |
| }; | |
| struct Output { | |
| float4 frag_color : SV_Target; |
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
| Texture2D scene : register(t0, space2); | |
| SamplerState sampler0 : register(s0, space2); | |
| // Scalar uniforms passed from Ruby via `uniforms: [{ name:, value:, type: }, ...]`. | |
| // Members must match the array order. Fragment uniform buffers live in space3 | |
| // (b registers) for SDL_shadercross HLSL. | |
| cbuffer Uniforms : register(b0, space3) { | |
| int tick_count; | |
| float time; | |
| }; |
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
| Texture2D scene : register(t0, space2); | |
| SamplerState sampler0 : register(s0, space2); | |
| // Scalar uniforms passed from Ruby via `uniforms: [{ name:, value:, type: }, ...]`. | |
| // Members must match the array order. Fragment uniform buffers live in space3 | |
| // (b registers) for SDL_shadercross HLSL. | |
| cbuffer Uniforms : register(b0, space3) { | |
| int tick_count; | |
| float time; | |
| }; |
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 OnScreenGamepad | |
| attr :inputs, :directional_vector, :directional_angle, :dpad_vector | |
| def initialize inputs, side: :left | |
| @side = side | |
| @inputs = inputs | |
| end | |
| def tick | |
| if finger |
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 Game | |
| attr :camera | |
| def initialize world_data | |
| @world_data = world_data | |
| @player = Player.new @world_data.player.ordinal_x, | |
| @world_data.player.ordinal_y | |
| @tiles = @world_data.tiles | |
| @walls = @world_data.walls | |
| @spikes = @world_data.spikes |
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
| #!/usr/bin/env ruby | |
| require "optparse" | |
| require "tty-prompt" | |
| require_relative "lib" | |
| ARGV.delete("--") | |
| options = {} | |
| OptionParser.new do |opts| |
NewerOlder