https://github.com/walidabazo/videovr-panoramavr
Video Virtual reality (VR) and Panorama Virtual reality (VR) By Unity 3d
https://github.com/walidabazo/videovr-panoramavr
360-photo 360-video googlevr insideout location mouse panorama sdk shader swipe unity unity-3d unity3d video webar webkit webxr
Last synced: 6 months ago
JSON representation
Video Virtual reality (VR) and Panorama Virtual reality (VR) By Unity 3d
- Host: GitHub
- URL: https://github.com/walidabazo/videovr-panoramavr
- Owner: walidabazo
- Created: 2019-04-18T08:30:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T00:48:52.000Z (over 4 years ago)
- Last Synced: 2025-04-05T08:04:53.620Z (7 months ago)
- Topics: 360-photo, 360-video, googlevr, insideout, location, mouse, panorama, sdk, shader, swipe, unity, unity-3d, unity3d, video, webar, webkit, webxr
- Language: ShaderLab
- Size: 8.79 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VideoVR-PanoramaVR
Video Virtual reality (VR) and Panorama Virtual reality (VR) By Unity 3d[](https://youtu.be/nXBj3EdirJU)
## Insideout
Shader "Insideout" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
Cull front // ADDED BY BERNIE, TO FLIP THE SURFACES
LOD 100
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"struct appdata_t {
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};struct v2f {
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
};sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
// ADDED BY BERNIE:
v.texcoord.x = 1 - v.texcoord.x;
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord);
return col;
}
ENDCG
}
}}
## Mouse Location to swipe
public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
public RotationAxes axes = RotationAxes.MouseXAndY;
public float sensitivityX = 15F;
public float sensitivityY = 15F;
public float minimumX = -360F;
public float maximumX = 360F;
public float minimumY = -60F;
public float maximumY = 60F;
float rotationY = 0F;
void Update()
{
if (axes == RotationAxes.MouseXAndY)
{
float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp(rotationY, minimumY, maximumY);transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
}
else if (axes == RotationAxes.MouseX)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
}
else
{
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp(rotationY, minimumY, maximumY);transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
}
}void Start()
{
// Make the rigid body not change rotation
if (GetComponent())
GetComponent().freezeRotation = true;
}
## Can be start web Augmented reality
Https://Webxr.edafait.com## Good Company hosting and low price VPN
https://shorturl.edafait.com/?fZVHLor## YouTube Channel Wonder developer To Subscriber
https://shorturl.edafait.com/?zuS4kvW