Let's take Qt online installer and Qt Creator as an example.
At the time of this writing:
//MIT License | |
//Copyright (c) 2021 Felix Westin | |
//Source: https://github.com/Fewes/MinimalAtmosphere | |
//Ported to GLSL by Marcin Ignac | |
#ifndef ATMOSPHERE_INCLUDED | |
#define ATMOSPHERE_INCLUDED | |
// ------------------------------------- |
Shader "WorldNormalFromDepthTexture" | |
{ | |
Properties { | |
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
LOD 100 |
Nightly required - get link from the bottom of this page (e.g. https://openframeworks.cc/ci_server/versions/nightly/of_v20190324_linuxarmv7l_nightly.tar.gz) | |
https://openframeworks.cc/download/ | |
Download OF and unpack: | |
wget https://openframeworks.cc/ci_server/versions/nightly/of_v20190324_linuxarmv7l_nightly.tar.gz | |
tar -zxvf of_v20190324_linuxarmv7l_nightly.tar.gz | |
mv of_v20190324_linuxarmv7l_nightly openFrameworks |
Also see the original Pieter Noordhuis's guide
You need:
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
#ifndef __QUATERNION_INCLUDED__ | |
#define __QUATERNION_INCLUDED__ | |
#define QUATERNION_IDENTITY float4(0, 0, 0, 1) | |
#ifndef PI | |
#define PI 3.14159265359f | |
#endif | |
// Quaternion multiplication |
#ifndef _LOOK_AT_MATRIX_ | |
#define _LOOK_AT_MATRIX_ | |
float4x4 look_at_matrix(float3 at, float3 eye, float3 up) { | |
float3 zaxis = normalize(at - eye); | |
float3 xaxis = normalize(cross(up, zaxis)); | |
float3 yaxis = cross(zaxis, xaxis); | |
return float4x4( | |
xaxis.x, yaxis.x, zaxis.x, 0, | |
xaxis.y, yaxis.y, zaxis.y, 0, |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.