Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Lelong rotoglup

View GitHub Profile
@rotoglup
rotoglup / MetalConstants.h
Last active Oct 1, 2020
Definition of some Metal constant values
View MetalConstants.h
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
View 202006 - notes about tools.md

Conan (on Windows)

  • conan search <name> -r conan-center

What I liked :

  • easy install through python's pip

What I don't like :

View 202005 - notes about system configuration
* `Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private`
@rotoglup
rotoglup / 202005 - notes about c-c++ libraries.md
Created May 21, 2020
Random notes while using random libraries
View 202005 - notes about c-c++ libraries.md

Handmade Math

  • v1.11, 05/2020, https://github.com/HandmadeMath/Handmade-Math
  • I like the C API, and single-file distribution, but had the following problems
    • no support for matrix inverse
    • troubles building in C++ code, with gcc: error: ISO C++ prohibits anonymous structs [-Werror=pedantic]
@rotoglup
rotoglup / 202005 - threejs gotchas.md
Last active May 18, 2020
A personal list of traps if fell into using threejs
View 202005 - threejs gotchas.md

applyMatrix on Geometry does not flip faces when needed

applyMatrix, on Geometry or BufferGeometry, does not flip faces indices when applying a matrix that flips normals (determinant < 0).

see https://github.com/mrdoob/three.js/issues/17361

View 202003 - a look into threejs shaders.md

Based on my looking at ThreeJS r115dev source code, while trying to figure out how to customize the lighting by writing my own shader.

Materials

ThreeJS has the following Material classes :

  • MeshBasicMaterial, not affected by lights
  • MeshLambertMaterial: lighting is computed at each vertex, for diffuse lighting, and interpolated in gouraud like fashion
View 202003 - a look into threejs API.md

Once more, I'm struggling to wrap my head around the threejs API, here are my notes.

IMPORTANT base on threejs r114 (march 2020)

API topics covered :

  • Scene and Object3D, hierarchy, transforms
  • Maths, linear algebra
  • DirectionalLight, as I'm currently trying to understand how to attach one of them to a Camera...
View 202003 - a look into threejs API
Once more, I'm struggling to wrap my head around the threejs API, here are my notes.
> **IMPORTANT** base on threejs `r114` (march 2020)
API topics covered :
* Scene and Object3D, hierarchy, transforms
* Maths, linear algebra
* DirectionalLight, as I'm currently trying to understand how to attach one of them to a Camera...
@rotoglup
rotoglup / Blender scripting notes.md
Last active Oct 6, 2020
Some Blender 2.80 scripting notes
View Blender scripting notes.md

Cycles

I had crashes while scripting the CUDA devices selection (b3d v2.83 + 4x GTX 2080 GPU).

The original code was :

preferences = bpy.context.preferences
cycles_preferences = preferences.addons["cycles"].preferences
cuda_devices, opencl_devices = cycles_preferences.get_devices()
@rotoglup
rotoglup / graphics-companies.geojson
Last active Dec 6, 2019
A map of companies developping graphics software, in Europe
View graphics-companies.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.