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 = "Map Grass GL4", | |
version = "v0.001", | |
desc = "Instanced rendering of garbagegrass", | |
author = "Beherith", | |
date = "2021.04.12", | |
license = "CC-BY-NC-ND 4.0", | |
layer = -1000000000000, |
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 = "Map Edge Extension", | |
version = "v0.7", | |
desc = "Draws a mirrored map next to the edges of the real map", | |
author = "ivand", | |
date = "2020", | |
license = "GPL", | |
layer = 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
function APTGETSOURCE { | |
pkg=$1 | |
cd $(mktemp -d) | |
apt source $pkg && apt-get build-dep -y $pkg | |
tmp_dir=$(pwd) | |
for d in $(find ./ -maxdepth 1 -not -path "./" -type d); do | |
cd $d | |
break | |
done | |
} |
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 = "Deferred rendering2", | |
version = 3, | |
desc = "Collects and renders point, cone and beam lights", | |
author = "ivand", | |
date = "2020", |
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 = "skin", | |
desc = "skin", | |
author = "ivand", | |
license = "GNU GPL, v2 or later", | |
layer = 0, | |
enabled = true -- loaded by default? | |
} | |
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
-- Spring OpenGL abstraction layer (GLAL). Abstracts away the difference between maintenance and develop engines | |
-- Author: ivand/LHoG | |
local isDevelop = (gl.CreateVertexArray ~= nil) | |
if isDevelop then | |
----------------------------------------------------------------- | |
-- Develop | |
----------------------------------------------------------------- |
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 <memory> | |
#include <iostream> | |
#include <cassert> | |
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
| Image format (sized) | Unsized | Compr | Pixel format | Pixel type | | |
|---------------------------------------|--------------------|-------|--------------------|-----------------------------------| | |
| GL_R8 | GL_RED | False | GL_RED | GL_UNSIGNED_BYTE | | |
| GL_R8_SNORM | GL_RED | False | GL_RED | GL_BYTE | | |
| GL_R16 | GL_RED | False | GL_RED | GL_UNSIGNED_SHORT | | |
| GL_R16_SNORM | GL_RED | False | GL_RED | GL_SHORT | | |
| GL_R32F | GL_RED | False | GL_RED | GL_FLOAT | | |
| GL_R8I | GL_RED | False | GL_RED_INTEGER | GL_INT | |
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
//https://www.shadertoy.com/view/MslyRr | |
/////////////////////////////////////////////////////////////////////////////// | |
mat4 RotationMatrix(vec3 axis, float angle) | |
{ | |
axis = normalize(axis); | |
float s = sin(angle); | |
float c = cos(angle); | |
float oc = 1.0 - c; | |
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.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
vec3 SpherePoints_GoldenAngle(float i, float numSamples) { | |
const float goldenAngle = PI * (3.0 - sqrt(5.0)); | |
float theta = i * goldenAngle; | |
float z = (1.0 - 1.0/numSamples) * (1.0 - 2.0 * i / (numSamples - 1.0)); | |
float radius = sqrt(1.0 - z * z); | |
return vec3(radius * cos(theta), radius * sin(theta), z); | |
} |