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
| #include <map> | |
| #include <SDL2/SDL_assert.h> | |
| #include <bx/allocator.h> | |
| #include <iqm.h> | |
| #include "myon.hpp" | |
| #include "mesh.hpp" | |
| #include "fs.hpp" |
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
| diff --git a/include/bgfx/bgfxplatform.h b/include/bgfx/bgfxplatform.h | |
| index f44bb82..497a109 100644 | |
| --- a/include/bgfx/bgfxplatform.h | |
| +++ b/include/bgfx/bgfxplatform.h | |
| @@ -82,6 +82,12 @@ namespace bgfx | |
| /// | |
| const InternalData* getInternalData(); | |
| + struct VRData | |
| + { |
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
| #include "geometry.hpp" | |
| //#include "math.hpp" | |
| namespace math { | |
| inline uint32_t float4_to_rgba8(const float *in_color) { | |
| uint32_t color = 0; | |
| color |= uint32_t(uint8_t(in_color[0] * 255) << 0); | |
| color |= uint32_t(uint8_t(in_color[1] * 255) << 8); | |
| color |= uint32_t(uint8_t(in_color[2] * 255) << 16); | |
| color |= uint32_t(uint8_t(in_color[3] * 255) << 24); | |
| return color; |
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
| varying vec3 f_normal; | |
| #ifdef VERTEX | |
| attribute vec3 VertexNormal; | |
| uniform mat4 u_view, u_model, u_projection; | |
| vec4 position(mat4 mvp, vec4 v_position) { | |
| f_normal = (u_model * vec4(VertexNormal, 1.0)).xyz; | |
| return u_projection * u_view * u_model * v_position; |
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
| local l3d = require "love3d" | |
| local cpml = require "cpml" | |
| -- ... | |
| function love.draw() | |
| l3d.set_depth_test "less" | |
| love.graphics.setShader(shader) | |
| local w, h = love.graphics.getDimensions() |
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
| #if VERTEX | |
| $input a_position, a_texcoord0 | |
| $output v_texcoord0 | |
| #include "common.glsl" | |
| void main() { | |
| v_texcoord0 = a_texcoord0; | |
| gl_Position = mul(u_modelViewProj, vec4(a_position, 1.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
| #define SPREAD 10.0 | |
| #define OFFSET 1.0 | |
| vec2 hash23(vec3 p3) { | |
| p3 = fract(p3 * vec3(443.897, 441.423, 437.195)); | |
| p3 += dot(p3, p3.yzx+19.19); | |
| return fract(vec2((p3.x + p3.y)*p3.z, (p3.x+p3.z)*p3.y))*2.0-1.0; | |
| } | |
| vec4 sample(vec2 uv, float offset, float n, bool dancing) { |
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
| --- ...snip... | |
| if not headless then | |
| require "love.system" | |
| require "love.window" | |
| end | |
| local flags = { | |
| width = 1280, | |
| height = 720, | |
| highdpi = true, |
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
| -- Basic ring buffer utility, to spare the hassle. | |
| local ringbuffer = {} | |
| local ringbuffer_mt = {} | |
| local function new(_items) | |
| local t = { | |
| items = _items or {}, | |
| current = 1 | |
| } | |
| return setmetatable(t, ringbuffer_mt) |
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
| #include <lua.hpp> | |
| #include <cstdint> | |
| #include <vector> | |
| #include "kaguya.hpp" | |
| #include "pecs.hpp" | |
| using namespace std; | |
| using namespace pecs; | |
| #define GENERATE_COMPONENT(ENUM, TYPE, NAME) \ |