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
float cross2d(vec2 v1, vec2 v2) { | |
return v1.x * v2.y - v1.y * v2.x; | |
} | |
// https://www.uio.no/studier/emner/matnat/ifi/nedlagte-emner/INF4360/h10/undervisningsmateriale/bc_lecture.pdf | |
bool GetQuadUV(vec2 p00, vec2 p10, vec2 p01, vec2 p11, vec2 p, out vec2 uv) { | |
vec2 a = p00 - p; | |
vec2 b = p10 - p00; | |
vec2 c = p01 - p00; | |
vec2 d = p00 - p10 - p01 + p11; |
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
const float M_PI = 3.1415926535897932384626433832795; | |
float rand(float p) | |
{ | |
return fract(sin(p) * 43758.5453123); | |
} | |
/* | |
float rand(vec2 p) | |
{ | |
return fract(sin(dot(p, vec2(12.9898, 4.1414))) * 43758.5453); |
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
function widget:GetInfo() | |
return { | |
name = "CUS GL4", | |
author = "ivand", | |
layer = 0, | |
enabled = true, | |
} | |
end | |
--inputs |
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
1st add: find_package(coz-profiler), add library dl, include coz.h and COZ_PROGRESS; in gameFrame() | |
2nd: compile with clang RelwithDebug or maybe gcc with some correct -gdwarf-4 settings | |
3rd: run: "coz run --- ./spring ./demos/2022xxx.sdfz" | |
4th: use /skip 10000 to profile synced code and maybe pause to profile drawing | |
From a6cfcbd9141146a5c84c38182a4cd6086608947e Mon Sep 17 00:00:00 2001 | |
From: You Name <your@example.com> |
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
docker run -it verybadsoldier/springrts-build:latest dev -b BAR105-winres2 -p linux-64 | |
./engine/105.1.1-739-ga241485\ bar/spring --isolation --write-dir /home/ak/Documents/Beyond\ All\ Reason --menu="rapid://byar-chobby:test" |
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
function widget:GetInfo() | |
return { | |
name = "Resolution Testing", | |
desc = "Debug changing fulscreen/borderless/resolution", | |
layer = 0, | |
enabled = true, | |
} | |
end | |
local windowType = { |
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 "FixedPipelineState.h" | |
#include <array> | |
#include <stdexcept> | |
#include "System/type2.h" | |
#include "System/float4.h" | |
#include "System/StringHash.h" | |
#include "Rendering/GlobalRendering.h" |
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 <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
#include <vector> | |
#include <algorithm> | |
#include <iostream> | |
void framebuffer_size_callback(GLFWwindow* window, int width, int height); | |
void processInput(GLFWwindow *window); |
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
function widget:GetInfo() | |
return { | |
name = "Unitshapes Rendering", | |
version = "v0.2", | |
desc = "Unitshapes Rendering", | |
author = "ivand", | |
date = "2020", | |
license = "GPL", | |
layer = 0, | |
enabled = false, |
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
function widget:GetInfo() | |
return { | |
name = "Test Unitshapes Rendering", | |
version = "v0.2", | |
desc = "Test Unitshapes Rendering", | |
author = "ivand", | |
date = "2020", | |
license = "GPL", | |
layer = 0, | |
enabled = true, |
NewerOlder