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
| // https://forum.unity.com/threads/id-like-to-merge-the-two-shaders-below-how-to-script.1041223/ | |
| Shader "Custom/UV rotation" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _Angle ("Angle", Range(-5.0, 5.0)) = 0.0 | |
| } | |
| 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
| // https://developer.arm.com/documentation/100140/0100/advanced-techniques-in-unity/source-code-for-editor-script-to-generate-cubemaps-for-unity | |
| /* | |
| * This confidential and proprietary software may be used only as | |
| * authorised by a licensing agreement from ARM Limited | |
| * (C) COPYRIGHT 2014 ARM Limited | |
| * ALL RIGHTS RESERVED | |
| * The entire notice above must be reproduced on all authorised | |
| * copies and copies may only be made to the extent permitted | |
| * by a licensing agreement from ARM Limited. |
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
| // https://forum.unity.com/threads/shader-question-how-to-recalculate-normals-after-vertices-displacement.903248/ | |
| // normal reconstruction after vertex displacement in real-time: | |
| // Morph input shape (for example Sphere) to cube, with normal reconstruction and diffuse lighting | |
| Shader "Other/RecalculateVertexNormals" | |
| { | |
| SubShader | |
| { | |
| Pass | |
| { |
vs OBJ
- Obj doesn't support mesh animations https://godotforums.org/discussion/23545/gltf-vs-obj
- Obj doesn't easily support hierarchies
- Obj doesn't support modern materials, no shaders, no lights/cameras.. no geometry groups
gltf
- supports mesh compression
- Compressed texture format
- Binary buffers
- single file export with embedded resources
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
| // https://forum.unity.com/threads/unwanted-editor-hotkeys-in-game-mode.182073/#post-6701407 | |
| [InitializeOnLoad] | |
| public static class EnterPlayModeBindings | |
| { | |
| static EnterPlayModeBindings() | |
| { | |
| EditorApplication.playModeStateChanged += ModeChanged; | |
| EditorApplication.quitting += Quitting; | |
| } | |
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
| // http://answers.unity.com/answers/1741342/view.html | |
| using UnityEngine; | |
| using System.Threading; | |
| using System.Net.Sockets; | |
| using System.IO; | |
| using System.Collections.Concurrent; | |
| public class TCPImageStream : MonoBehaviour | |
| { |
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
| // old unityscript | |
| function drawLine(x0:int, y0:int, x1:int, y1:int) | |
| { | |
| dx= Mathf.Abs(x1-x0); | |
| dy= Mathf.Abs(y1-y0); | |
| if (x0 < x1) {sx=1;}else{sx=-1;} | |
| if (y0 < y1) {sy=1;}else{sy=-1;} | |
| err=dx-dy; | |
| loop=true; |
https://wiki.qt.io/Install_Qt_5_on_openSUSE
./qt-unified-linux-x64-online.run error: ./qt-unified-linux-x64-online.run: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory
didnt work:
- zypper install libxkbcommon-x11-0 works:
- install this to windows https://sourceforge.net/projects/vcxsrv/
- set display: export DISPLAY="
grep nameserver /etc/resolv.conf | sed 's/nameserver //':0" https://stackoverflow.com/a/63978089/5452781