- Rendering Physically-Based ModelIO Materials
- Physically Based Rendering in Filament
- Simplified PBR Shading Model for Unreal
- OpenGL - PBR (video) & OpenGL - PBR - LearnOpenGL & Source Code + Demos
- Moving Frostbite to PBR Slides SLIDES PAPER
- https://lousodrome.net/blog/light/2020/01/04/physically-based-rendering-references-at-the-end-of-2019/
- https://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
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
extension Array where Element == String { | |
@inlinable | |
public func withUnsafeCStringBufferPointer<R>(_ body: (UnsafeBufferPointer<UnsafePointer<CChar>?>) throws -> R) rethrows -> R { | |
func translate(_ slice: inout Self.SubSequence, | |
_ offset: inout Int, | |
_ buffer: UnsafeMutableBufferPointer<UnsafePointer<CChar>?>, | |
_ body: (UnsafeBufferPointer<UnsafePointer<CChar>?>) throws -> R) rethrows -> R { | |
guard let string = slice.popFirst() else { | |
return try body(UnsafeBufferPointer(buffer)) |
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 <iostream> | |
#include <vector> | |
#define GLFW_INCLUDE_VULKAN | |
#define VK_USE_PLATFORM_WIN32_KHR | |
#include <GLFW/glfw3.h> | |
#define GLFW_EXPOSE_NATIVE_WIN32 | |
#include <GLFW/glfw3native.h> |
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
/// In Metal buffers (MTLBuffer) require a specific alignment, this function helps with that. | |
/// <https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/2928169-setbuffers#discussion> | |
public func align<I>(_ value: I, to alignment: I) -> I where I: BinaryInteger { | |
assert(alignment == 0 || (alignment & (alignment-1)) == 0, "Alignment must be 0 or power of 2") | |
if alignment == 0 { | |
return value | |
} else if (value & (alignment - 1)) == 0 { | |
return value | |
} else { |
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
#!/bin/sh | |
# fail fast & fail uninizialized | |
set -ex | |
GIT=`xcrun -find git` | |
if [[ -n $1 && $1 == "YES" ]]; then paket=true; else paket=false; fi | |
if [[ -n $2 && $2 == "YES" ]]; then watch=true; else watch=false; fi | |
if [[ -n $3 && $3 == "YES" ]]; then appex=true; else appex=false; fi |
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
#!/bin/sh | |
GIT=$1 | |
if [[ -z $GIT ]]; then | |
GIT=git | |
fi | |
## Use the last annotated 'develop' tag as CFBundleShortVersionString | |
version=`"${GIT}" tag --merged HEAD --list 'develop/*' --sort=v:refname | tail -n 1` |
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
#!/bin/sh | |
GIT=$1 | |
if [[ -z $GIT ]]; then | |
GIT=git | |
fi | |
# Use the commit count before HEAD as CFBundleVersion | |
head_date=`"${GIT}" show -s --format=%cI` |
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
#!/bin/sh | |
# generate-global-app-config.sh | |
# DPAG-DHL | |
# | |
# Created by Christian Treffs on 26.01.17. | |
# | |
# This is a script to aggregate all export constants into *.h/*.m and *.swift global configuration files. | |
# It allows access to Xcode build settings that are managed via *.xcconfig files or the build settings tab. | |
# A maintaned version may be found at https://gitlab.7p-group.com/snippets/6 |
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
/// A First-in first-out queue (FIFO). | |
/// | |
/// - New elements are added to the end/tail of the queue. | |
/// - Dequeuing pulls elements from the front/head of the queue. | |
public struct Queue<Element> { | |
private var tail: ContiguousArray<Element?> | |
private var head: Int | |
/// Creates a new, empty queue. |