- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
Extracted from https://github.com/rpavlik/maya2osg/tree/master/src/GLSL
varying vec2 vTexCoord;
varying vec3 vNormal;
varying vec3 vEye;
void main() {
| in vec2 v_texcoord; // texture coords | |
| in vec3 v_normal; // normal | |
| in vec3 v_binormal; // binormal (for TBN basis calc) | |
| in vec3 v_pos; // pixel view space position | |
| out vec4 color; | |
| layout(std140) uniform Transforms | |
| { | |
| mat4x4 world_matrix; // object's world position |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| # Option 1: Use apt-get | |
| # keys taken from https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo | |
| cd ~/GitHub/r-with-intel-mkl/ | |
| wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
| apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
| sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' | |
| sudo apt-get update && sudo apt-get install intel-mkl-64bit |
| #include <SDL.h> | |
| #include <glad\glad.h> | |
| #include <nanovg.h> | |
| #define NANOVG_GL3_IMPLEMENTATION | |
| #include <nanovg_gl.h> | |
| #include <nanovg_gl_utils.h> // For framebuffer utilities not shown in this code | |
| #include <string> | |
| #include <iostream> | |
| #include <iomanip> // for setw |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| import numpy as np | |
| import torch | |
| def compute_similarity_transform(S1, S2): | |
| ''' | |
| Computes a similarity transform (sR, t) that takes | |
| a set of 3D points S1 (3 x N) closest to a set of 3D points S2, | |
| where R is an 3x3 rotation matrix, t 3x1 translation, s scale. | |
| i.e. solves the orthogonal Procrutes problem. | |
| ''' |