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
require("lualibs.vec") | |
function init() | |
-- get usual variables | |
global_t = get_time() | |
delta_t = get_delta_time() | |
screenx,screeny = get_window_size() | |
mouseposx,mouseposy = imgui_getmousepos() |
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
//Lazy DX11 Engine | |
//Lazy because: not errors checking | |
//Shaders must be in "shaders" folder | |
//It's necessary several imgui files from | |
//https://github.com/ocornut/imgui/tree/master | |
//Mainly imgui*.h (from root), backend DX11 and win32 files and misc folder | |
#include "lib3d.h" | |
#include "libmath.h" | |
#include "meshdata.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
/* | |
Solution to Project Euler 729 problem | |
https://projecteuler.net/problem=729 | |
output program (last one) | |
========================= | |
308896374.25023192167282 | |
*/ | |
#include <stdio.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
using UnityEngine; | |
using System.Collections; | |
public class ConversationManager : MonoBehaviour { | |
GameObject go1; | |
GameObject go2; | |
GameObject go3; | |
public Transform answerAnchorHide; |
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
using UnityEngine; | |
using System.Collections; | |
public class GameManager : MonoBehaviour { | |
public bool gameFinished = false; | |
int numLigadas = 0; | |
int numReports = 0; |
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
//FROM TOKERU HOUDINI BLOG | |
matrix morig = ident(); | |
matrix3 mrotate = ident(); | |
vector axis, pos, origin; | |
float angle, d, max; | |
// get control transform | |
morig = primintrinsic(1,'packedfulltransform',0); | |
// move the grid to the inverse of that position |
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
WINDOWS | |
======= | |
(for %i in (*.mp4) do @echo file '%i') > mylist.txt | |
ffmpeg -f concat -i mylist.txt -c copy output.mp4 | |
LINUX/MAC | |
========= | |
#!/bin/bash | |
for filename in *.mp4; do | |
echo "file '$filename'" >> concat-list.txt |
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
//COMPUTE SHADER | |
#define NUM_THREADS 8 | |
//Common variables | |
float4 _Size; | |
float _DeltaTime; | |
float _Dissipate; | |
float _Decay; |
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
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' | |
Shader "Unlit/VolumeMarching" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//Protoype of Free-Form Deformation based on http://faculty.cs.tamu.edu/schaefer/teaching/689_Fall2006/p151-sederberg.pdf | |
public class FFDModifier : MonoBehaviour | |
{ | |
public GameObject modelObject; | |
public GameObject ffdGizmo; | |
public int divX; |
NewerOlder