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
| void rng_seed(output int rng, int seed) | |
| { | |
| int chash = seed; | |
| if (chash == 0) chash = 1; | |
| rng = chash * 30391861; | |
| } | |
| float rng_uniform(output int rng) | |
| { | |
| float res = rng / float(2137483647) * 0.5 + 0.5; |
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
| void main() | |
| { | |
| vec3 positionX = backproject(depthTexture(pixelCoordinateI), inverseViewProjectionMatrix); | |
| vec3 normalX = normalTexture(pixelCoordinateI); | |
| // get ONB to transform samples | |
| mat3 orthoNormalBasis = computeONB(normalX); | |
| // select samples for pixel out of pattern | |
| int patternOffset = getPatternOffset(pixelCoordinateI); | |
| float ao = 0.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
| /* | |
| Unity editor script to precisely move, rotate and scale GameObjects on 2D scenes, using the arrow keys. | |
| Notes: | |
| - To use it just include it on an "Assets/Editor" folder on your project. | |
| - The action depends on the selected tool and the size of the movement depends on the Scene view zoom. | |
| - The more "zoomed in" is the scene view the smaller is the movement step. | |
| - It will work when the current Scene tab is in 2D mode and there is at least one gameObject selected, | |
| otherwise the scene camera will move as usual :) |
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
| // How to do a toolbar in Dear ImGui. | |
| const float toolbarSize = 50; | |
| void DockSpaceUI() | |
| { | |
| ImGuiViewport* viewport = ImGui::GetMainViewport(); | |
| ImGui::SetNextWindowPos(viewport->Pos + ImVec2(0, toolbarSize)); | |
| ImGui::SetNextWindowSize(viewport->Size - ImVec2(0, toolbarSize)); | |
| ImGui::SetNextWindowViewport(viewport->ID); |
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
| void printOpenGLDebugInfo() | |
| { | |
| int majorVersion, minorVersion; | |
| glGetIntegerv(GL_MAJOR_VERSION, &majorVersion); | |
| glGetIntegerv(GL_MINOR_VERSION, &minorVersion); | |
| std::cout << "OpenGL Version: " << majorVersion << "." << minorVersion | |
| << std::endl; | |
| int work_grp_cnt[3]; |
You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:
- Start the
ssh-agentfrom Windows Services:
- Type
Servicesin theStart MenuorWin+Rand then typeservices.mscto launch the Services window; - Find the
OpenSSH Authentication Agentin the list and double click on it; - In the
OpenSSH Authentication Agent Propertieswindow that appears, chooseAutomaticfrom theStartup type:dropdown and clickStartfromService status:. Make sure it now saysService status: Running.
- Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
Disclaimer: I have no professional education in Compulational Fluid Dynamics, these are various notes on what I found/learned when trying to learn a bit on the topic. Some of the notes lack sources as I wrote them up later often just remembering some StackExchange answer. Some things I might have misinterpreted.
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
| This note simply gathers some info and thoughts on building Node Editor, especially in an | |
| immediate mode setting. | |
| Q: How does imgui render rounded rects? | |
| Check imgui AddRectFilled | |
| Imgui drawing api is closer to nanoVG | |
| - Path is kept | |
| - Contents are modified based on path | |
En DemoWindow > Configuration > Fonts :
- Para cambiar el tamaño de la font de una sola ventana, existe
ImGui::SetWindowFontScale(window_scale), dondewindow_scalees un float que va desde 0.0 (tamaño casi invisible) a 2.0 (tamaño doble que el normal). - Para cambiar el tamaño de una font en todas las ventanas, alcanza con modificar
io.FontGlobalScale.ioes el contexto de ImGui que se obtiene en la inicialización.FontGlobalScalees un float que va desde 0.0 (tamaño casi invisible) a 2.0 (tamaño doble que el normal).
Ver líneas 3324 a 3327 de imgui_demo.cpp
OlderNewer
