Skip to content

Instantly share code, notes, and snippets.

@xtozero
xtozero / ue4-call-blueprint.cpp
Created May 29, 2025 06:35 — forked from gamerxl/ue4-call-blueprint.cpp
Example for calling a blueprint event / function from c++ in unreal engine 4.
// This example shows how to call a blueprint event / function from c++ in unreal engine 4.
// In this example we call a blueprint event named "ServerRequestPossess" (see below).
// The current character for instance.
// This character must be implemented in blueprint and provides the blueprint event named "ServerRequestPossess".
ACharacter* CurrentCharacter = <instance of ACharacter>;
// Just an another character. It could by any object.
ACharacter* AnotherCharacter = Cast<class ACharacter>(Hit.Actor);
@xtozero
xtozero / CloudsResources.md
Created September 14, 2021 15:43 — forked from pixelsnafu/CloudsResources.md
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

@xtozero
xtozero / GLSL-Noise.md
Created March 19, 2018 13:33 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@xtozero
xtozero / TypeChecker.cpp
Last active April 2, 2017 07:08
Detect implicit conversion in compile time
#include <iostream>
#include <utility>
#include <string>
template <typename T, typename U, typename... R>
class TypeChecker : public TypeChecker<T, R...>
{
public:
using TypeChecker<T, R...>::TypeChecker;
using TypeChecker<T, R...>::operator=;
@xtozero
xtozero / CDirectXMath.h
Created March 26, 2017 15:43
simple DirectXMath wrapper
#pragma once
#include <DirectXMath.h>
//------------------------------
// 3D Vector : simple wrapper class for support operation
struct CXMFLOAT2 : public DirectX::XMFLOAT2
{
CXMFLOAT2( ) = default;
using DirectX::XMFLOAT2::XMFLOAT2;