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
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 |
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
void revisedONB(const Vec3f &n, Vec3f &b1, Vec3f &b2) | |
{ | |
if(n.z<0.){ | |
const float a = 1.0f / (1.0f - n.z); | |
const float b = n.x * n.y * a; | |
b1 = Vec3f(1.0f - n.x * n.x * a, -b, n.x); | |
b2 = Vec3f(b, n.y*n.y*a - 1.0f, -n.y); | |
} | |
else { | |
const float a = 1.0f / (1.0f + n.z); |
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
#[derive(PartialEq, PartialOrd, Debug, Clone, Copy)] | |
pub struct UniqueId(pub u64); | |
macro_rules! unique { | |
() => {{ | |
#[allow(missing_copy_implementations)] | |
#[allow(non_camel_case_types)] | |
#[allow(dead_code)] | |
struct __unique_id_tag {}; | |
use core::any::TypeId; |
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
{- | |
src/Servant/API/RPC.hs:74:8-55: error: … | |
Conflicting family instance declarations: | |
ServerT (RPC e r) m = m (Either (OpenUnion e) r) | |
-- Defined at /home/lonokhov/work/stagex-store/stagex-api/src/Servant/API/RPC.hs:74:8 | |
ServerT (RPC e (Headers h r)) m = m (Headers | |
h (Either (OpenUnion e) r)) | |
-- Defined at /home/lonokhov/work/stagex-store/stagex-api/src/Servant/API/RPC.hs:81:8 | |
-} |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Database.PostgreSQL.Simple.Dsl.Escape | |
( escapeByteA | |
, escapeByteAFast | |
, escapeByteAHex | |
, escapeString | |
, escapeIdentifier | |
, escapeAction | |
) where |
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
from smmaya.core.api import as_api_dagpath | |
import maya.OpenMaya as om | |
import maya.OpenMayaUI as omu | |
def get_visible(camera, width=800, height=600): | |
if not isinstance(camera, om.MDagPath): | |
camera = as_api_dagpath(camera) | |
trav = omu.MDrawTraversal() | |
trav.setFrustum(camera, width, height) | |
trav.traverse() |
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
{-# LANGUAGE OverloadedStrings #-} | |
module SmAssetMan.Utils | |
(encodeHttpDate | |
,decodeHttpDate | |
,getIfModifiedSince | |
,getIfUnmodifiedSince | |
,getIfMatch | |
,getIfNoneMatch | |
,setETag | |
,setLastModified |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeOperators #-} | |
module Snap.Extras.RouteBoomerang | |
( showUrl | |
, showUrlMay | |
, showUrlWithParamsMay | |
, showUrlWithParams | |
, routeUrl |