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
// Copyright (C) 2018, Benjamin "BeRo" Rosseaux (benjamin@rosseaux.de) - License: CC0 | |
// Hint: It's not super accurate, but it should be good enough for games and demos with sky rendering. | |
#version 430 | |
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | |
uniform vec3 tc; // Time constant | |
layout(std430) buffer ssboAstronomy { | |
vec3 sunPosition; | |
float sunDistance; |
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
// Copyright (C) 2018, Benjamin "BeRo" Rosseaux (benjamin@rosseaux.de) - License: CC0 | |
#version 330 | |
layout(location = 0) out vec4 oOutput; | |
in vec2 vTexCoord; | |
flat in int vFaceIndex; | |
vec3 getCubeMapDirection(in vec2 uv, | |
in int faceIndex){ | |
vec3 zDir = vec3(ivec3((faceIndex <= 1) ? 1 : 0, | |
(faceIndex & 2) >> 1, |
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
// Force usage of dedicated GPU for OpenGL with Delphi and FreePascal/Lazarus on Multi-GPU systems such as Notebooks on Windows | |
// Insert that into your main source file, which is for example the .dpr (Delphi) or .lpr (Lazarus) file | |
{$define ForceDedicatedGPUUsage} // then you can uncomment and recomment this line, for compile-time-switching between | |
// integrated GPU and dedicated GPU | |
{$if defined(Windows) and defined(ForceDedicatedGPUUsage) and (defined(cpu386) or defined(cpux64) or defined(cpuamd64))} | |
{$ifdef fpc} | |
{$asmmode intel} | |
{$endif} |
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
// Hybrid atomic loop weighted blended order independent transparency implementation (work in progress) | |
// Copyright (C) 2014 by Benjamin 'BeRo' Rosseaux | |
// Licensed under the CC0 license, since in the German legislation exists no public | |
// domain. | |
// This implementation needs at least OpenGL 4.3 as minimum OpenGL version, due to my usage of shader storage buffer objects here | |
// Supports also additive blending for emission color portions | |
uniform sampler2D uTexTailWeightedBlendedOrderIndependentTransparencyColor; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="ecmascript string type wierdness fun"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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
comment_char % | |
escape_char / | |
% Locale for English locale in Germany | |
LC_IDENTIFICATION | |
title "English locale for Germany" | |
source "" | |
address "" | |
contact "Benjamin Rosseaux" | |
email "benjamin@rosseaux.de" |
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
////////////////////////////////////////////////////////////////////////////////////// | |
// | |
// BeRo Garbage Collector Memory Manager - Copyright (C) 2011, Benjamin 'BeRo' Rosseaux | |
// Warning: CODED IN FEW HOURS ON A SINGLE DAY, SO USE IT ON YOUR OWN RISK! | |
// | |
////////////////////////////////////////////////////////////////////////////////////// | |
// Version: 2011.03.14.0013 | |
////////////////////////////////////////////////////////////////////////////////////// | |
// | |
// Description: |
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
With version 347.09 WHQL tooks my SDSM tighting compute shader whole 70 ms per frame instead with the old verson 344.75 under 1ms (circa 0.7ms) on my GTX970. | |
See sdsm_reduce_tighting.glsl here, the $-stuff is my own preprocessor. | |
I'ver tracked to the "((lLinearZ >= reduceDataPartitions[lPartitionIndex].x) && (lLinearZ <= reduceDataPartitions[lPartitionIndex].w))" (in sdsm_reduce_tighting.glsl) comparsion down, but really just the comparsion itself, because: | |
70ms per frame: | |
if((lLinearZ >= reduceDataPartitions[lPartitionIndex].x) && (lLinearZ <= reduceDataPartitions[lPartitionIndex].w)){ | |
minBoundsSun[lPartitionIndex] = min(minBoundsSun[lPartitionIndex], lSunLightSpaceCoord.xyz); |
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
procedure TEngineMIDIEventList.FindInterval(const aResultList:TEngineMIDIEventDynamicArrayList;const aFromTime,aToTime:TEngineTime); | |
var Lower,Upper,Mid,Index,StartIndex,MinIndex,MaxIndex, | |
EventFromIndex,EventToIndex,NextStartIndex,TryIndex:SizeInt; | |
Event,TemporaryEvent:TEngineMIDIEvent; | |
FromTime,NextFromTime,EventFromTime,EventToTime, | |
MinEventTime,MaxEventTime:TEngineTime; | |
DoAdd:boolean; | |
begin | |
if fCount>0 then begin |