Skip to content

Instantly share code, notes, and snippets.

View ker2x's full-sized avatar

Laurent Laborde ker2x

  • Toulouse, France
  • 06:39 (UTC +02:00)
View GitHub Profile
private static void RenderFunc(int y, int w, int h, int nbSamples,
Vector3 eye, Vector3 gaze,
Vector3 cx, Vector3 cy,
IList<Vector3> vList, Rng rng) {
var luminance = new Vector3();
for (var x = 0; x < w; ++x) { // row
for (int sy = 0, i = (h - 1 - y) * w + x; sy < 2; ++sy) { //column
for (var sx = 0; sx < 2; ++sx) { //subpixel row
luminance.Zero();
#include <iostream>
#include <d3d12.h>
#include <dxgi1_4.h>
#include <tchar.h>
LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
return ::DefWindowProc(hWnd, msg, wParam, lParam);
}
#include "Game.h"
/// <summary>
/// init, loop, quit. easy.
/// </summary>
void Game::run() {
std::cout << "Game run()\n";
initWindow(); // Init some GLFW stuff and other misc
initVulkan(); // The important part, Vulkan
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MainScript : MonoBehaviour
{
Terrain terrain;
TerrainData terrainData;
GameObject terrainObject;
Material terrainMaterial;
/*************************************************
4Display Shield Library Example
Code: Oscar Gonzalez December 2010
www.BricoGeek.com
Copyright(c) December 2010 Oscar Gonzalez - www.BricoGeek.com
http://code.google.com/p/displayshield4d/
echo "--- TZDATA ---"
echo "tzdata tzdata/Areas select Europe" > /tmp/preseed.txt
echo "tzdata tzdata/Zones/Europe select Paris" >> /tmp/preseed.txt
debconf-set-selections /tmp/preseed.txt
rm /etc/timezone
rm /etc/localtime
apt-get install -y tzdata
rm /tmp/preseed.txt
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.